/* EL CHANCE · Tema «Salón Rubí» (dirección A aprobada, 2026-11).
   Capa de migración: se carga al final del layout y reemplaza progresivamente
   a site.css / sistema-visual.css / el-chance-futuro.css por módulos.
   Módulos migrados: cabecera, navegación, Inicio y Tiempos (Portal/Jugar).
   Reglas: tokens --ect-*; selectores con prefijo body.ec-app; sin cambiar
   clases, data-* ni scripts. El dorado solo para acción principal y dinero;
   el rojo de marca para identidad y selección; nunca texto rojo sobre oscuro. */
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EC Sans"; src: url("/fonts/inter-ExtraBold.woff") format("woff"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "EC Serif"; src: url("/fonts/ecserif-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EC Serif"; src: url("/fonts/ecserif-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --ect-bg: #0e0a0a; --ect-bg-2: #140e0e;
  --ect-s1: #1e1213; --ect-s2: #281719; --ect-s3: #331e21; --ect-s4: #42262a;
  --ect-line: rgb(246 230 210 / .09); --ect-line-2: rgb(246 230 210 / .16); --ect-line-3: rgb(246 230 210 / .26);
  --ect-ivory: #f7efe4; --ect-ivory-2: #dacdbd; --ect-ivory-3: #ab9c8d;
  --ect-red-900: #5e0207; --ect-red-700: #9a040c; --ect-red-600: #c3060f; --ect-red-500: #e30613; --ect-red-glow: rgb(227 6 19 / .4);
  --ect-gold-200: #fbecc6; --ect-gold-300: #f2d895; --ect-gold-400: #e1ba68; --ect-gold-ink: #291b0d; --ect-focus: #f8dc9f;
  --ect-gold-metal: linear-gradient(180deg, #fbe8b6 0%, #ecc979 38%, #cf9f48 70%, #b88633 100%);
  --ect-ok: #8fd6a8; --ect-warn: #f2c46b; --ect-err: #ffb4a6;
  --ect-tiempos: #ff2a35; --ect-chance: #f39a4a; --ect-casino: #a07bff; --ect-raspas: #3cc6b7; --ect-regalo: #46c1c9;
  --ect-r: 16px; --ect-r-lg: 22px;
  --ect-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 18px 40px -22px rgb(0 0 0 / .9);
  --ect-nav-h: 64px;
  --ect-sans: "EC Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --ect-serif: "EC Serif", Georgia, "Times New Roman", serif;
}

:root {
  /* Paleta heredada redirigida al tema: todos los módulos que usan estas
     variables adoptan las superficies cálidas, el marfil y el dorado nuevos. */
  --ec-future-ink: #f7efe4; --ec-future-muted: #cdbfb2;
  --ec-future-gold: #e1ba68; --ec-future-gold-light: #f2d895;
  --ec-future-panel: #1e1213; --ec-future-raised: #281719; --ec-future-inset: #140e0e;
  --ec-future-line: #4a3434; --ec-future-shadow: 0 18px 40px -22px #000000e6;
  --ec-bg: #0e0a0a; --ec-field: #140e0e; --ec-red: #c3060f; --ec-ruby: #e30613;
  --ec-focus: #f8dc9f; --ec-section-accent: #f2d895;
  --ec-action-gold: linear-gradient(180deg, #fbe8b6 0%, #ecc979 38%, #cf9f48 70%, #b88633 100%);
  --ec-action-gold-hover: linear-gradient(180deg, #fff0c8 0%, #f1d189 38%, #d8aa52 70%, #c08f39 100%);
  --ec-action-navigation: linear-gradient(180deg, #e30613, #a8040d);
  --ec-radius-card: 20px;
}
body.ec-app { font-family: var(--ect-sans); -webkit-font-smoothing: antialiased; }
/* Foco visible de 3 px con el mismo tono que el resto del portal. */
body.ec-app .topbar :focus-visible, body.ec-app:has(.home-welcome) #contenido-principal :focus-visible, body.ec-app:has(.play-wizard) #contenido-principal :focus-visible { outline: 3px solid var(--ect-focus); outline-offset: 3px; }

/* ---------- Botones compartidos ---------- */
body.ec-app .button.action-continue,
body.ec-app .button.action-money,
body.ec-app .button.action-deposit {
  color: var(--ect-gold-ink); background: var(--ect-gold-metal); border: 1px solid #a77a2c;
  box-shadow: 0 1px 0 rgb(255 248 225 / .7) inset, 0 -1px 0 rgb(120 80 20 / .35) inset, 0 10px 24px -12px rgb(225 186 104 / .65);
  text-shadow: none; transition: background-color .16s ease, box-shadow .16s ease, transform .08s ease; }
body.ec-app .button.action-continue:hover:not(:disabled),
body.ec-app .button.action-money:hover:not(:disabled),
body.ec-app .button.action-deposit:hover { background: linear-gradient(180deg, #fff0c8 0%, #f1d189 38%, #d8aa52 70%, #c08f39 100%); }
body.ec-app .button.action-continue:active:not(:disabled),
body.ec-app .button.action-money:active:not(:disabled),
body.ec-app .button.action-deposit:active { transform: translateY(1px); box-shadow: 0 1px 2px rgb(60 35 5 / .5) inset; }
body.ec-app .button.action-continue:disabled,
body.ec-app .button.action-money:disabled { color: var(--ect-ivory-3); background: var(--ect-s2); border-color: var(--ect-line); box-shadow: none; }

/* ---------- Cabecera (todas las vistas del portal) ---------- */
/* Sin backdrop-filter: crearía un bloque contenedor para la navegación fija interna. */
body.ec-app .topbar,
body.ec-app .topbar:has(.header-wallet) {
  position: sticky; top: 0; z-index: 35;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand wallet actions";
  align-items: center; gap: 8px;
  max-width: none; width: 100%; height: auto; min-height: 62px; margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  border: 0; border-bottom: 1px solid rgb(242 216 149 / .22); border-radius: 0;
  background: linear-gradient(180deg, #e30613, #a8040d);
  box-shadow: 0 10px 28px -16px rgb(0 0 0 / .9); }
body.ec-app .topbar::before, body.ec-app .topbar::after { display: none; }
body.ec-app .topbar .brand { grid-area: brand; gap: 10px; min-width: 0; }
body.ec-app .topbar .brand-logo { width: 38px; height: 38px; border-radius: 11px; border: 0; box-shadow: 0 0 0 1px rgb(242 216 149 / .45), 0 4px 10px rgb(0 0 0 / .35); }
body.ec-app .topbar .brand > span { display: none; }
body.ec-app .topbar .brand strong { font-family: var(--ect-serif); font-weight: 700; font-size: 1.12rem; letter-spacing: .04em; color: #fff; }
body.ec-app .topbar .brand small { display: none; }
body.ec-app .topbar-actions { grid-area: actions; gap: 6px; }
body.ec-app .topbar-actions .icon-button,
body.ec-app .topbar-actions .ec-audio-open { width: 40px; height: 40px; min-height: 40px; border: 0; border-radius: 12px; background: rgb(0 0 0 / .2); color: #fff; box-shadow: none; backdrop-filter: none; }
body.ec-app .topbar-actions .icon-button:hover,
body.ec-app .topbar-actions .ec-audio-open:hover { background: rgb(0 0 0 / .34); }
body.ec-app .topbar-actions svg { width: 21px; height: 21px; }

body.ec-app .header-wallet {
  grid-area: wallet; justify-self: end;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: auto; min-width: 0; margin: 0;
  padding: 4px 4px 4px 12px; border: 0; border-radius: 14px;
  background: rgb(22 8 10 / .78); box-shadow: 0 0 0 1px rgb(242 216 149 / .2) inset; }
body.ec-app .header-wallet-balance { display: grid; gap: 0; flex: 0 1 auto; min-width: 0; line-height: 1.1; color: var(--ect-ivory); }
body.ec-app .header-wallet-balance > span { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ect-gold-300); white-space: nowrap; }
body.ec-app .header-wallet-balance > strong { color: var(--ect-ivory); font-size: 1.05rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ec-app .header-wallet-recharge { flex: 0 0 auto; min-height: 40px; padding: 0 12px; border-radius: 11px; font-size: .84rem; font-weight: 800; white-space: nowrap; }
body.ec-app .header-wallet-history { display: none; }
body.ec-app .header-wallet-recharge > span[aria-hidden] { font-size: 1.05em; line-height: 1; }
/* En pantallas angostas se acortan las etiquetas visibles; el texto completo sigue en el DOM. */
@media (max-width: 429px) { body.ec-app .header-wallet-label-extra { display: none; } }
@media (max-width: 379px) {
  body.ec-app .header-wallet-recharge { width: 40px; padding: 0; justify-content: center; font-size: 1.15rem; }
  body.ec-app .header-wallet-recharge-label { display: none; }
}
@media (min-width: 560px) { body.ec-app .topbar .brand > span { display: grid; } }
@media (min-width: 1360px) { body.ec-app .header-wallet-history { display: inline-flex; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--ect-ivory-2); background: transparent; font-size: .8rem; } }

/* ---------- Navegación inferior ---------- */
body.ec-app .bottom-nav {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; transform: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0;
  width: 100%; min-height: calc(var(--ect-nav-h) + env(safe-area-inset-bottom)); margin: 0;
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  border: 0; border-top: 1px solid var(--ect-line); border-radius: 0;
  background: rgb(18 13 12 / .96); box-shadow: 0 -8px 24px rgb(0 0 0 / .35); }
body.ec-app .bottom-nav a,
body.ec-app .bottom-nav .nav-agent {
  position: relative; isolation: isolate; display: grid; place-items: center; align-content: center; gap: 3px;
  min-width: 0; min-height: var(--ect-nav-h); margin: 0; padding: 4px 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--ect-ivory-3); font-size: .68rem; font-weight: 600; letter-spacing: 0; text-decoration: none; overflow: visible; }
body.ec-app .bottom-nav a::before, body.ec-app .bottom-nav a::after { display: none; }
body.ec-app .bottom-nav .nav-icon,
body.ec-app .bottom-nav .nav-play .nav-icon,
body.ec-app .bottom-nav .nav-agent .nav-icon { width: 24px; height: 24px; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; transform: none; }
body.ec-app .bottom-nav .nav-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.ec-app .bottom-nav .nav-label { line-height: 1.15; white-space: nowrap; max-width: 100%; text-align: center; }
@media (max-width: 1023px) {
  body.ec-app .bottom-nav .nav-label { white-space: normal; overflow-wrap: anywhere; }
  body.ec-app .bottom-nav:has(> :nth-child(6)) .nav-label { font-size: .62rem; letter-spacing: -.01em; }
}
body.ec-app .bottom-nav a:hover { color: var(--ect-ivory); background: transparent; }
body.ec-app .bottom-nav a[aria-current=page],
body.ec-app .bottom-nav .nav-agent[aria-current=page] { color: var(--ect-ivory); background: transparent; border: 0; box-shadow: none; }
body.ec-app .bottom-nav a[aria-current=page]::before {
  content: ""; display: block; position: absolute; z-index: -1; top: 7px; left: 50%; width: 54px; height: 30px; margin-left: -27px; border-radius: 999px;
  background: linear-gradient(180deg, var(--ect-red-600), var(--ect-red-700)); box-shadow: 0 1px 0 rgb(255 160 170 / .3) inset, 0 6px 14px -6px var(--ect-red-glow); }
body.ec-app .bottom-nav a:focus-visible { outline: 3px solid var(--ect-focus); outline-offset: -4px; border-radius: 12px; }
body.ec-app .bottom-nav .nav-agent { color: var(--ect-gold-300); }
body.ec-app .bottom-nav .nav-agent-label { font-weight: 700; }
/* Microinteracciones: tómbola gira al entrar a Tiempos; palanca baja al tocar Juegos. */
body.ec-app .bottom-nav .ico-cage, body.ec-app .bottom-nav .ico-lever { transform-box: fill-box; transform-origin: center; }
body.ec-app .bottom-nav .ico-ball { fill: currentColor; stroke: none; }
body.ec-app .bottom-nav a[aria-current=page] .ico-cage { animation: ect-cage-spin .9s cubic-bezier(.3,.7,.3,1) .15s 1; }
body.ec-app .bottom-nav a:active .ico-cage { animation: ect-cage-spin .6s ease-out 1; }
body.ec-app .bottom-nav a:active .ico-lever { transform: translateY(3px); transition: transform .08s ease; }
@keyframes ect-cage-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.ec-app .bottom-nav .ico-cage { animation: none !important; }
  body.ec-app .bottom-nav a:active .ico-lever { transform: none; }
}
/* site.js mide la altura real del menú (zoom, seis destinos) en --portal-nav-clearance. */
body.ec-app:not(.casino-immersive-page):has(.bottom-nav) .page-shell { padding-bottom: max(calc(var(--ect-nav-h) + env(safe-area-inset-bottom) + 28px), var(--portal-nav-clearance, 0px)); }
html:has(body.ec-app .bottom-nav) { scroll-padding-bottom: calc(var(--ect-nav-h) + 16px); }

@media (min-width: 1024px) {
  body.ec-app .topbar, body.ec-app .topbar:has(.header-wallet), body.ec-app .topbar:has(.bottom-nav) {
    grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "brand nav wallet actions"; gap: 12px 20px;
    padding-inline: max(24px, calc((100vw - 1200px) / 2)); min-height: 64px; }
  body.ec-app .topbar .bottom-nav {
    grid-area: nav; position: static; display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 2px;
    min-height: 0; width: auto; padding: 0; border: 0; background: none; box-shadow: none; }
  body.ec-app .topbar .bottom-nav a,
  body.ec-app .topbar .bottom-nav .nav-agent { display: inline-flex; flex-direction: row; flex-wrap: nowrap; align-items: center; white-space: nowrap; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: #fff; font-size: .9rem; font-weight: 600; }
  body.ec-app .topbar .bottom-nav .nav-icon, body.ec-app .topbar .bottom-nav .nav-icon svg { width: 18px; height: 18px; }
  body.ec-app .topbar .bottom-nav a { flex: 0 0 auto; }
  body.ec-app .topbar .bottom-nav .nav-label { overflow: visible; text-overflow: clip; }
  body.ec-app .topbar .bottom-nav a:hover { background: rgb(0 0 0 / .2); }
  body.ec-app .topbar .bottom-nav a[aria-current=page] { background: rgb(22 8 10 / .55); box-shadow: inset 0 -2px 0 var(--ect-gold-400); }
  body.ec-app .topbar .bottom-nav a[aria-current=page]::before { display: none; }
  body.ec-app:not(.casino-immersive-page):has(.bottom-nav) .page-shell { padding-bottom: max(56px, var(--portal-nav-clearance, 0px)); }
  html:has(body.ec-app .bottom-nav) { scroll-padding-bottom: 24px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  body.ec-app .topbar .bottom-nav .nav-icon { display: none; }
  body.ec-app .topbar .brand > span { display: none; }
  body.ec-app .topbar .bottom-nav a { padding: 0 10px; }
}

/* ---------- Fondo compartido por todo el portal ---------- */
.ec-app:not(.casino-immersive-page) { background: radial-gradient(1100px 560px at 80% -10%, rgb(227 6 19 / .22), transparent 64%) var(--ect-bg); }
.ec-app:not(.casino-immersive-page)::before {
  opacity: 1;
  background:
    radial-gradient(1100px 560px at 80% -10%, rgb(227 6 19 / .34), transparent 64%),
    radial-gradient(800px 520px at -15% 105%, rgb(160 4 12 / .26), transparent 62%),
    linear-gradient(180deg, var(--ect-bg-2), var(--ect-bg) 40%); }

/* ---------- Inicio ---------- */
body.ec-app:has(.home-welcome) .page-shell { max-width: 1200px; padding-top: 18px; }
body.ec-app:has(.home-welcome) #contenido-principal .home-welcome { margin: 0 0 16px; padding: 0; }
body.ec-app:has(.home-welcome) #contenido-principal .home-greeting { margin: 0; color: var(--ect-ivory-2); font-size: .92rem; }
body.ec-app:has(.home-welcome) #contenido-principal .home-welcome h1 { margin: 2px 0 0; font-family: var(--ect-serif); font-weight: 600; font-size: clamp(1.7rem, 6.4vw, 2.7rem); line-height: 1.08; letter-spacing: -.012em; color: var(--ect-ivory); }
body.ec-app:has(.home-welcome) #contenido-principal .home-welcome h1 em { font-style: italic; font-weight: 500; color: var(--ect-gold-200); }
body.ec-app:has(.home-welcome) #contenido-principal .home-wallet-note { display: none; }
@media (min-width: 768px) { body.ec-app:has(.home-welcome) #contenido-principal .home-wallet-note { display: block; margin: 6px 0 0; color: var(--ect-ivory-3); } }
body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby { display: block; padding: 0; background: none; border: 0; box-shadow: none; }
body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby::before, body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby::after { display: none; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities .section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 0; border: 0; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities .section-title h2 { margin: 0; color: var(--ect-gold-300); font: 700 .74rem/1.3 var(--ect-sans); letter-spacing: .14em; text-transform: uppercase; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities .home-section-note { color: var(--ect-ivory-3); font-size: .8rem; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }

body.ec-app:has(.home-welcome) #contenido-principal .home-modality {
  --accent: var(--ect-gold-400);
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch;
  grid-column: auto; min-height: 156px; margin: 0; padding: 16px; overflow: hidden;
  border: 0; border-radius: var(--ect-r-lg); background: var(--ect-s1); color: var(--ect-ivory); text-decoration: none;
  box-shadow: var(--ect-shadow), 0 0 0 1px var(--ect-line) inset; transform: none;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease; }
body.ec-app:has(.home-welcome) #contenido-principal a.home-modality:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -26px color-mix(in srgb, var(--accent) 55%, black), 0 0 0 1px var(--ect-line-2) inset; }
body.ec-app:has(.home-welcome) #contenido-principal a.home-modality:active { transform: none; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality:focus-visible { outline: 3px solid var(--ect-focus); outline-offset: 3px; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality::after {
  content: ""; display: block; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 1;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 85%, transparent), transparent) top / 100% 1.5px no-repeat;
  box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality::before {
  content: ""; display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 1;
  background: linear-gradient(180deg, rgb(14 10 10 / 0) 18%, rgb(14 10 10 / .55) 52%, rgb(14 10 10 / .94) 100%); }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality :is(.modality-tiempos-art, .modality-chance-art, .modality-casino-suite) {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; opacity: 1; transform: none; overflow: hidden; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality .modality-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--pos, 70% 40%);
  opacity: 1; filter: none; transform: scale(1.02); transition: transform .5s cubic-bezier(.2,.7,.2,1); -webkit-mask: none; mask: none; }
body.ec-app:has(.home-welcome) #contenido-principal a.home-modality:hover .modality-backdrop { transform: scale(1.06); }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality > div { flex: 0 0 auto; position: relative; z-index: 1; display: grid; gap: 2px; margin: 0; padding: 0; background: none; max-width: none; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-kicker {
  max-width: 100%;
  display: inline-flex; align-items: center; gap: 6px; justify-self: start; margin: 0 0 6px; padding: 3px 8px;
  border: 0; border-radius: 999px; background: rgb(14 10 10 / .62); box-shadow: 0 0 0 1px var(--ect-line-2) inset;
  color: var(--ect-ivory-2); font-size: .62rem; font-weight: 700; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-kicker::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality strong { margin: 0; font-family: var(--ect-serif); font-weight: 600; font-size: 1.45rem; line-height: 1.05; letter-spacing: -.01em; color: var(--ect-ivory); text-shadow: 0 2px 12px rgb(0 0 0 / .45); }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality small { display: block; margin-top: 4px; color: var(--ect-ivory-2); font-size: .84rem; line-height: 1.35; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-caption,
body.ec-app:has(.home-welcome) #contenido-principal .modality-chance-logo { display: none; }
/* Accesos de Inicio: dorado sólido, texto oscuro y altura táctil estable. */
body.ec-app:has(.home-welcome) #contenido-principal .home-modality .modality-action {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; align-self: flex-start;
  width: max-content; max-width: 100%; min-width: 0; min-height: 44px; margin: 12px 0 0; padding: 10px 14px; border: 1px solid #b88633; border-radius: 12px;
  background: var(--ect-gold-metal); background-color: #e1ba68; box-shadow: 0 1px 0 rgb(255 248 225 / .7) inset, 0 5px 12px rgb(0 0 0 / .18);
  color: var(--ect-gold-ink); font-size: .84rem; line-height: 1.3; font-weight: 700; text-shadow: none; white-space: normal; overflow-wrap: normal; word-break: normal; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-action > span { min-width: 0; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-action > [aria-hidden] { flex-shrink: 0; }
body.ec-app:has(.home-welcome) #contenido-principal a.home-modality:hover .modality-action { filter: brightness(1.06); }
body.ec-app:has(.home-welcome) #contenido-principal a.home-modality:active .modality-action { filter: brightness(.94); box-shadow: 0 1px 3px rgb(0 0 0 / .25) inset; }
body.ec-app:has(.home-welcome) #contenido-principal .home-modality .modality-action::before,
body.ec-app:has(.home-welcome) #contenido-principal .home-modality .modality-action::after { display: none; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-action-text { display: none; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-action-compact { display: inline; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-state { position: relative; z-index: 1; align-self: flex-start; margin-top: 12px; padding: 4px 10px; border-radius: 999px; background: rgb(14 10 10 / .7); color: var(--ect-ivory-2); font-size: .76rem; font-weight: 700; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-unavailable { filter: saturate(.55); }

/* Tiempos: protagonista, acción dorada. */
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos { --accent: var(--ect-tiempos); --pos: 72% 30%; grid-column: 1 / -1; min-height: 248px; padding: 20px; background: var(--ect-red-900); box-shadow: var(--ect-shadow), 0 0 0 1px rgb(255 42 53 / .35) inset; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos::before { background: linear-gradient(90deg, rgb(76 2 8 / .97) 0%, rgb(88 3 9 / .74) 46%, rgb(88 3 9 / .05) 80%), linear-gradient(0deg, rgb(64 2 6 / .75), transparent 45%); }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos strong { font-size: clamp(2rem, 9vw, 2.9rem); }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos small { max-width: 21ch; font-size: .95rem; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-flags { position: relative; inset: auto; top: auto; right: auto; z-index: 1; order: 2; display: flex; gap: 6px; min-height: 0; margin: 10px 0 0; padding: 0; border: 0; border-radius: 0; background: none; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-flags .country-flag::after { display: none; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-flags .country-flag { position: relative; inset: auto; width: 28px; height: 19px; border: 0; border-radius: 4px; box-shadow: 0 0 0 1px rgb(255 255 255 / .25), 0 3px 8px rgb(0 0 0 / .4); font-size: 0; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos > div { order: 1; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-action { order: 3; min-height: 48px; min-width: min(180px, 100%); margin-top: 16px; padding: 10px 20px; border-radius: 12px; color: var(--ect-gold-ink); background: var(--ect-gold-metal); box-shadow: 0 1px 0 rgb(255 248 225 / .7) inset, 0 10px 24px -12px rgb(225 186 104 / .65); font-size: .95rem; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-action-text { display: inline; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-action-compact { display: none; }

body.ec-app:has(.home-welcome) #contenido-principal .modality-chance { --accent: var(--ect-chance); --pos: 60% 30%; grid-column: 1 / -1; min-height: 120px; justify-content: center; padding-right: 44%; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-chance::before { background: linear-gradient(90deg, rgb(14 10 10 / .96) 30%, rgb(14 10 10 / .4) 64%, rgb(14 10 10 / .1)); }
/* EL CHANCE: el arte cubre la tarjeta; un velo lateral deja el texto legible a la izquierda. */
body.ec-app:has(.home-welcome) #contenido-principal .modality-chance { --pos: 88% 35%; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-chance::before { background: linear-gradient(90deg, rgb(14 10 10 / .94) 0%, rgb(14 10 10 / .78) 45%, rgb(14 10 10 / .15) 100%); }
body.ec-app:has(.home-welcome) #contenido-principal .modality-chance .modality-action { position: relative; inset: auto; margin-top: 12px; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-games { --accent: var(--ect-casino); --pos: 50% 50%; }
body.ec-app:has(.home-welcome) #contenido-principal .modality-raspas { --accent: var(--ect-raspas); --pos: 50% 40%; }
@media (max-width: 399px) {
  body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos { min-height: 236px; padding: 16px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos .modality-action { margin-top: 12px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-chance { min-height: 118px; padding-right: 38%; }
  body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas) { min-height: 146px; }
  body.ec-app:has(.home-welcome) #contenido-principal .home-welcome h1 { font-size: 1.55rem; }
  body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas) .modality-kicker,
  body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas) small { display: none; }
}
@media (min-width: 768px) {
  body.ec-app:has(.home-welcome) #contenido-principal .home-modalities-grid { grid-template-columns: repeat(4, 1fr); grid-template-areas: "t t c c" "t t j r"; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos { grid-area: t; min-height: 400px; padding: 28px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-chance { grid-area: c; min-height: 194px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-games { grid-area: j; min-height: 194px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-raspas { grid-area: r; min-height: 194px; }
}
@media (max-width: 767px) { body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas) .modality-kicker { display: none; } }
@media (max-width: 767px) {
  /* Máximo dos columnas; una si el texto ampliado requiere más espacio. */
  body.ec-app:has(.home-welcome) #contenido-principal .home-modalities-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(8rem, calc(50% - 6px))), 1fr)); gap: 12px; }
  body.ec-app:has(.home-welcome) #contenido-principal .modality-chance { padding-right: 16px; }
}
@media (min-width: 768px) and (max-width: 1023px) { body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas) small { display: none; } }
@media (min-width: 1024px) {
  body.ec-app:has(.home-welcome) #contenido-principal .modality-tiempos { min-height: 440px; }
  body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-chance, .modality-games, .modality-raspas) { min-height: 214px; }
}
body.ec-app:has(.home-welcome) #contenido-principal .home-ticket-history {
  display: flex; align-items: center; gap: 14px; min-height: 56px; margin: 12px 0 0; padding: 12px 16px;
  border: 0; border-radius: var(--ect-r); background: var(--ect-s1); box-shadow: 0 0 0 1px var(--ect-line) inset; color: var(--ect-ivory); text-decoration: none; }
body.ec-app:has(.home-welcome) #contenido-principal .home-ticket-history:hover { background: var(--ect-s2); }
body.ec-app:has(.home-welcome) #contenido-principal .home-ticket-history svg { color: var(--ect-gold-300); flex: none; }
body.ec-app:has(.home-welcome) #contenido-principal .home-ticket-history > span:nth-of-type(1) { display: grid; flex: 1; min-width: 0; }
body.ec-app:has(.home-welcome) #contenido-principal .home-ticket-history small { color: var(--ect-ivory-3); font-size: .82rem; }
body.ec-app:has(.home-welcome) #contenido-principal .home-benefits-stage { margin-top: 28px; }

/* ---------- Tiempos (Portal/Jugar): botones base de la vista ---------- */
body.ec-app:has(.play-wizard) #contenido-principal .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--ect-line-2); background: var(--ect-s3); color: var(--ect-ivory); font-weight: 700; font-size: .95rem; letter-spacing: .005em; text-decoration: none; white-space: nowrap; box-shadow: none; text-shadow: none; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .08s ease; -webkit-tap-highlight-color: transparent; }
body.ec-app:has(.play-wizard) #contenido-principal .button::before, body.ec-app:has(.play-wizard) #contenido-principal .button::after { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .button:hover { border-color: var(--ect-line-3); background: var(--ect-s4); transform: none; }
body.ec-app:has(.play-wizard) #contenido-principal .button:active:not(:disabled) { transform: translateY(1px); }
body.ec-app:has(.play-wizard) #contenido-principal .button.action-continue, body.ec-app:has(.play-wizard) #contenido-principal .button.action-money {
  color: var(--ect-gold-ink); background: var(--ect-gold-metal); border: 1px solid #a77a2c;
  box-shadow: 0 1px 0 rgb(255 248 225 / .7) inset, 0 -1px 0 rgb(120 80 20 / .35) inset, 0 10px 24px -12px rgb(225 186 104 / .65); }
body.ec-app:has(.play-wizard) #contenido-principal .button.action-continue:hover:not(:disabled), body.ec-app:has(.play-wizard) #contenido-principal .button.action-money:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff0c8 0%, #f1d189 38%, #d8aa52 70%, #c08f39 100%); border-color: #b4873a; }
body.ec-app:has(.play-wizard) #contenido-principal .button.action-continue:active:not(:disabled), body.ec-app:has(.play-wizard) #contenido-principal .button.action-money:active:not(:disabled) {
  box-shadow: 0 1px 2px rgb(60 35 5 / .5) inset, 0 4px 10px -8px rgb(225 186 104 / .6); }
body.ec-app:has(.play-wizard) #contenido-principal .button:disabled { color: var(--ect-ivory-3); background: var(--ect-s2); border-color: var(--ect-line); box-shadow: none; }
body.ec-app:has(.play-wizard) #contenido-principal .button.ghost { background: transparent; border-color: var(--ect-line-2); color: var(--ect-ivory); }
body.ec-app:has(.play-wizard) #contenido-principal .button.full { width: 100%; }
body.ec-app:has(.play-wizard) #contenido-principal .text-button { min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--ect-gold-300); font-weight: 700; font-size: .88rem; text-decoration: underline; text-decoration-color: rgb(242 216 149 / .35); text-underline-offset: 4px; }
body.ec-app:has(.play-wizard) #contenido-principal .text-button.danger { color: var(--ect-ivory-2); text-decoration-color: var(--ect-line-3); }

/* ---------- Tiempos · estructura: el tablero primero y una barra fija ---------- */
/* Mismo marcado y mismos data-* que Portal/Jugar.cshtml; solo cambia el orden visual. */
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .step-card,
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .play-summary { display: flex; flex-direction: column; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .step-title { order: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .draw-list { order: 1; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .draw-more-bar { order: 2; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .group-feedback { order: 3; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .draw-continue-bar { order: 9; }

body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .step-title { order: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .number-workspace { order: 1; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .play-groups { order: 2; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > [data-undo-group] { order: 3; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .step-actions { order: 4; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .draw-continue-bar { order: 9; }

/* Paso 2: el tablero primero; las explicaciones después, sin eliminarlas. */
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-workspace { display: flex; flex-direction: column; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-amount-panel { order: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection { order: 1; display: flex; flex-direction: column; }
/* Mantener Cambiar monto junto al tablero, también para sorteos normales. */
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .active-paint-amount { order: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .active-paint-amount { display: flex; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .number-range-label { order: 1; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .number-blocks { order: 2; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .number-grid { order: 3; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .group-feedback { order: 4; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .play-budget { order: 5; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .number-picker-heading { order: 6; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-selection > .brush-controls { order: 7; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-grid { touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* Barra de acción fija sobre la navegación inferior. */
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .draw-continue-bar {
  position: sticky; z-index: 20; top: auto;
  bottom: calc(var(--ect-nav-h) + env(safe-area-inset-bottom) + 10px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .draw-continue-bar .button { flex: 0 1 auto; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; height: auto; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .compact-step-status { min-width: 0; display: grid; gap: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .compact-step-status > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-blocks button { white-space: nowrap; }
@media (max-width: 399px) { body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .play-budget { flex-wrap: wrap; } body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .play-budget p { text-align: left !important; max-width: none !important; } }
/* Pasos 2 y 3: la portada se reduce para dar espacio al tablero. */
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard:has([data-play-step="0"][hidden]) .play-heading p { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard:has([data-play-step="0"][hidden]) .play-heading { min-height: 0; padding-block: 12px; }
@media (min-width: 1024px) {
  /* En escritorio la barra queda arriba, bajo la cabecera, y no tapa el tablero. */
  body.ec-app:has(.play-wizard) #contenido-principal .play-wizard [data-play-step="0"] > .draw-continue-bar,
  body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-builder > .draw-continue-bar { order: 0; top: var(--portal-header-clearance, 76px); bottom: auto; margin-top: 0; margin-bottom: 18px; }
  body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .number-workspace { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: 28px; align-items: start; }
  body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .group-amount-panel { position: sticky; top: calc(var(--portal-header-clearance, 76px) + 96px); }
}


/* ---------- Tiempos · lenguaje visual ---------- */
/* Neutraliza superficies heredadas antes de aplicar el lenguaje nuevo. */
body.ec-app:has(.play-wizard) #contenido-principal :is(.play-progress > span, .toggle-row, .review-payment-breakdown > div, .review-checkout, .review-disclosure, .draw-option, .summary-total, .checkout-confirmation, .review-payment-note, .play-budget, .group-amount-panel, .play-running-summary, .play-group, .play-heading, .step-card, .play-summary, .draw-continue-bar, .active-paint-amount, .number-blocks, .times-tickets-content, .number-grid, .draw-list, .review-section, .review-jugadas, .review-draws) { border: 0; margin: 0; min-height: 0; }
body.ec-app:has(.play-wizard) #contenido-principal :is(.review-checkout, .review-details, .review-section, .number-workspace, .number-selection, .play-main) { padding: 0; background: none; box-shadow: none; }
body.ec-app:has(.play-wizard) #contenido-principal .play-main { display: block; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-list { grid-template-columns: minmax(0, 1fr); padding: 0; margin: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress > span { min-height: 0; padding: 0; background: none; box-shadow: none; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress > span::before, body.ec-app:has(.play-wizard) #contenido-principal .play-progress > span::after { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option { grid-template-rows: auto; grid-template-areas: none; row-gap: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option > * { grid-row: auto; grid-column: auto; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option .country-flag::after { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-payout { padding: 0; border: 0; border-radius: 0; background: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle { padding: 0 14px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-continue-bar { flex-direction: row; flex-wrap: nowrap; }
body.ec-app:has(.play-wizard) #contenido-principal :is(.number-workspace, .group-amount-panel, .number-selection, .step-card, .play-main) { min-width: 0; max-width: 100%; }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-panel .amount-pills { max-width: none; min-width: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .checkout-confirmation:empty, body.ec-app:has(.play-wizard) #contenido-principal .review-payment-note:empty { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .checkout-confirmation { padding: 10px 12px; border-radius: 12px; background: var(--ect-s2); color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row { text-align: left; margin: 10px 0 0; }
body.ec-app:has(.play-wizard) #contenido-principal .step-card, body.ec-app:has(.play-wizard) #contenido-principal .play-summary { margin-bottom: 14px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading { margin-bottom: 14px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary { margin-bottom: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-group { margin-top: 6px; }

body.ec-app:has(.play-wizard) #contenido-principal .play-wizard { display: block; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets { max-width: 1100px; margin: 0 auto 14px; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets > summary { list-style: none; display: flex; justify-content: space-between; width: 100%; min-height: 46px; background: var(--ect-s1); border-color: var(--ect-line); color: var(--ect-ivory-2); font-weight: 600; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets > summary::-webkit-details-marker { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets > summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets-content { margin-top: 8px; padding: 16px; border-radius: var(--ect-r); background: var(--ect-s1); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets-heading h2 { font-family: var(--ect-serif); font-size: 1.2rem; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets-heading p, body.ec-app:has(.play-wizard) #contenido-principal .recent-tickets-empty { color: var(--ect-ivory-3); font-size: .86rem; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets-links .button { min-height: 44px; font-size: .85rem; }
body.ec-app:has(.play-wizard) #contenido-principal .eyebrow { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ect-gold-300); }

body.ec-app:has(.play-wizard) #contenido-principal .play-heading { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 128px; margin-bottom: 14px; padding: 18px; overflow: hidden; border-radius: var(--ect-r-lg); background: var(--ect-red-900); box-shadow: 0 0 0 1px rgb(255 42 53 / .3) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading-art { position: absolute; inset: 0; z-index: -2; }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading-art img { width: 100%; height: 100%; object-fit: cover; object-position: 80% 30%; }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(80 2 8 / .97) 0%, rgb(92 3 8 / .78) 52%, rgb(92 3 8 / .1)); }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading h1 { margin-top: 2px; font-family: var(--ect-serif); font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.08; }
body.ec-app:has(.play-wizard) #contenido-principal .play-heading p { max-width: 30ch; margin-top: 4px; color: var(--ect-ivory-2); font-size: .88rem; }

body.ec-app:has(.play-wizard) #contenido-principal .play-progress { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 4px 16px; counter-reset: s; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress::before { content: ""; position: absolute; left: 16.66%; right: 16.66%; top: 15px; height: 2px; background: var(--ect-s3); }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress span { position: relative; display: grid; justify-items: center; gap: 6px; color: var(--ect-ivory-3); }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; font-size: .86rem; font-weight: 800; color: var(--ect-ivory-2); transition: background-color .2s ease, box-shadow .2s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress em { font-style: normal; font-size: .76rem; font-weight: 600; letter-spacing: .02em; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .complete b { background: var(--ect-red-700); box-shadow: 0 0 0 1px #f02a34 inset; color: var(--ect-ivory); font-size: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .complete b::after { content: "✓"; font-size: .9rem; }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .complete em { color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .active { color: var(--ect-ivory); }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .active b { background: var(--ect-gold-metal); color: var(--ect-gold-ink); box-shadow: 0 0 0 4px rgb(225 186 104 / .16), 0 6px 18px -6px rgb(225 186 104 / .6); }
body.ec-app:has(.play-wizard) #contenido-principal .play-progress .active em { color: var(--ect-ivory); font-weight: 700; }

body.ec-app:has(.play-wizard) #contenido-principal .alert, body.ec-app:has(.play-wizard) #contenido-principal .notice { padding: 12px 14px; border-radius: 12px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; color: var(--ect-ivory-2); font-size: .88rem; margin-bottom: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .alert.error { background: #2a1214; box-shadow: 0 0 0 1px rgb(255 140 120 / .35) inset, 4px 0 0 var(--ect-red-500) inset; color: var(--ect-err); }
body.ec-app:has(.play-wizard) #contenido-principal .play-expiry-notice { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: #2a2010; box-shadow: 0 0 0 1px rgb(242 196 107 / .35) inset; color: var(--ect-warn); }

body.ec-app:has(.play-wizard) #contenido-principal .step-card, body.ec-app:has(.play-wizard) #contenido-principal .play-summary { padding: 18px 16px; border-radius: var(--ect-r-lg); background: var(--ect-s1); box-shadow: var(--ect-shadow), 0 0 0 1px var(--ect-line) inset; }
@media (min-width: 768px) { body.ec-app:has(.play-wizard) #contenido-principal .step-card, body.ec-app:has(.play-wizard) #contenido-principal .play-summary { padding: 24px; } }
body.ec-app:has(.play-wizard) #contenido-principal .step-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
body.ec-app:has(.play-wizard) #contenido-principal .step-title > span { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .step-title h2 { font-family: var(--ect-serif); font-weight: 600; font-size: 1.32rem; line-height: 1.15; padding-left: 12px; box-shadow: -3px 0 0 var(--ect-red-500); }
body.ec-app:has(.play-wizard) #contenido-principal .step-title p { padding-left: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .step-title p { margin-top: 4px; color: var(--ect-ivory-3); font-size: .86rem; }

/* Barra fija */
body.ec-app:has(.play-wizard) #contenido-principal .draw-continue-bar { margin: 16px -6px 0; padding: 10px 10px 10px 14px; border-radius: 16px; background: linear-gradient(90deg, rgb(204 5 17 / .97), rgb(112 3 10 / .97)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 1px var(--ect-line-2) inset, 0 16px 36px -12px rgb(0 0 0 / .85); }
body.ec-app:has(.play-wizard) #contenido-principal .compact-step-status > span { font-size: .78rem; color: #fff3f0; font-weight: 600; }
body.ec-app:has(.play-wizard) #contenido-principal .compact-play-totals small { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .compact-play-totals strong { white-space: nowrap;  font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ect-ivory); }
body.ec-app:has(.play-wizard) #contenido-principal .draw-continue-bar .button { min-width: 148px; }
@media (max-width: 359px) { body.ec-app:has(.play-wizard) #contenido-principal .draw-continue-bar .button { min-width: 0; padding: 0 14px; } body.ec-app:has(.play-wizard) #contenido-principal .compact-step-status > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* Sorteos */
body.ec-app:has(.play-wizard) #contenido-principal .draw-list { display: grid; gap: 8px; }
@media (min-width: 768px) { body.ec-app:has(.play-wizard) #contenido-principal .draw-list { grid-template-columns: 1fr 1fr; } }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 72px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; transition: background-color .18s ease, box-shadow .18s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option:has([aria-pressed="true"]) { background: linear-gradient(90deg, rgb(227 6 19 / .28), var(--ect-s2) 70%); box-shadow: 0 0 0 1.5px var(--ect-red-500) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option[data-expired="true"] { opacity: .55; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-backdrop { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option .country-flag { width: 34px; height: 23px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-chance-logo { width: 34px; height: 34px; border-radius: 9px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-detail { display: grid; min-width: 0; gap: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-name { font-weight: 700; font-size: .98rem; overflow-wrap: anywhere; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-payouts { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .78rem; color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .draw-payout { font-weight: 700; color: var(--ect-gold-300); font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-payout-red { color: #ffb3bd; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-cadence { color: #ffd7b0; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-close { font-size: .76rem; color: var(--ect-ivory-3); font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle { min-width: 84px; min-height: 44px; padding: 0 14px; border-radius: 11px; border: 1px solid #b88633; background: var(--ect-gold-metal); color: var(--ect-gold-ink); font-weight: 700; font-size: .88rem; transition: background-color .15s ease, border-color .15s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle:hover:not(:disabled) { border-color: #fbe8b6; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle[aria-pressed="true"] { background: var(--ect-red-600); color: #fff3e3; border-color: #ff8991; box-shadow: 0 0 0 1px #ff8991 inset; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle:disabled { opacity: .45; cursor: not-allowed; }
body.ec-app:has(.play-wizard) #contenido-principal :is(.draw-toggle, .number-blocks button):focus-visible { outline: 3px solid #fff3e3; outline-offset: 3px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-more-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--ect-ivory-3); font-size: .8rem; }
body.ec-app:has(.play-wizard) #contenido-principal .group-feedback { margin-top: 10px; color: var(--ect-ivory-3); font-size: .84rem; }
body.ec-app:has(.play-wizard) #contenido-principal .group-feedback.error { color: var(--ect-err); }

/* Paso 2 */
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-panel { padding: 14px; border-radius: 16px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-heading small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .12em; color: var(--ect-ivory-3); }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-heading strong { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-heading strong::before { content: "₡"; margin-right: 2px; font-size: .7em; color: var(--ect-gold-300); }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-heading > span { padding: 4px 9px; border-radius: 999px; background: rgb(225 186 104 / .12); color: var(--ect-gold-200); font-size: .72rem; font-weight: 700; }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button { min-height: 44px; border-radius: 10px; border: 1px solid var(--ect-line-2); background: var(--ect-s3); color: var(--ect-ivory); font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums; transition: background-color .15s ease, border-color .15s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button:hover:not(:disabled) { border-color: var(--ect-line-3); }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button.active, body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button[aria-pressed="true"] { background: var(--ect-gold-metal); color: var(--ect-gold-ink); border-color: #a77a2c; }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button:disabled { opacity: .38; }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-panel .amount-pills { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
body.ec-app:has(.play-wizard) #contenido-principal .group-amount-panel .amount-pills button { width: auto; min-width: 0; padding: 0 6px; }
body.ec-app:has(.play-wizard) #contenido-principal .custom-amount-row, body.ec-app:has(.play-wizard) #contenido-principal .reventado-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
body.ec-app:has(.play-wizard) #contenido-principal .reventado-field { flex-wrap: wrap; }
body.ec-app:has(.play-wizard) #contenido-principal .field-label { font-size: .84rem; font-weight: 600; color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal input[type="number"], body.ec-app:has(.play-wizard) #contenido-principal input[inputmode="numeric"] { width: 132px; min-height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ect-line-2); background: var(--ect-bg-2); color: var(--ect-ivory); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
body.ec-app:has(.play-wizard) #contenido-principal input:focus-visible { border-color: var(--ect-gold-400); outline: 2px solid rgb(225 186 104 / .35); outline-offset: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .number-selection { margin-top: 16px; }
body.ec-app:has(.play-wizard) #contenido-principal .number-range-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: .9rem; }
body.ec-app:has(.play-wizard) #contenido-principal .number-range-label span { color: var(--ect-ivory-3); font-size: .76rem; font-weight: 500; }
body.ec-app:has(.play-wizard) #contenido-principal .number-blocks { border: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--ect-bg-2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .number-blocks button { min-height: 44px; border: 1px solid #806333; border-radius: 9px; background: #352919; color: #fbe8b6; font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .number-blocks button:hover:not([aria-pressed="true"]):not(:disabled) { background: #493721; border-color: #d5aa52; }
body.ec-app:has(.play-wizard) #contenido-principal .number-blocks button[aria-pressed="true"] { background: var(--ect-gold-metal); color: var(--ect-gold-ink); border-color: #fbe8b6; box-shadow: 0 -3px 0 #72501a inset; font-weight: 800; }
body.ec-app:has(.play-wizard) #contenido-principal .number-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
@media (min-width: 768px) { body.ec-app:has(.play-wizard) #contenido-principal .number-grid { grid-template-columns: repeat(10, 1fr); } }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell { position: relative; aspect-ratio: 1 / 1; min-height: 52px; padding: 0; border-radius: 13px; border: 0; background: linear-gradient(180deg, var(--ect-s3), var(--ect-s2)); box-shadow: 0 0 0 1px var(--ect-line-2) inset, 0 1px 0 rgb(255 255 255 / .04) inset; color: var(--ect-ivory); transition: background-color .12s ease, box-shadow .12s ease, transform .08s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell > span, body.ec-app:has(.play-wizard) #contenido-principal .number-cell[aria-pressed] > span { background: none; border: 0; border-radius: inherit; box-shadow: none; padding: 0; width: 100%; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell::before, body.ec-app:has(.play-wizard) #contenido-principal .number-cell::after, body.ec-app:has(.play-wizard) #contenido-principal .number-cell > span::before, body.ec-app:has(.play-wizard) #contenido-principal .number-cell > span::after { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell > span { display: grid; place-items: center; align-content: center; height: 100%; gap: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell b { font-size: 1.22rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell small { font-size: .62rem; font-weight: 700; white-space: pre-line; line-height: 1.05; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell:hover { box-shadow: 0 0 0 1px var(--ect-line-3) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell:active { transform: scale(.96); }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell.assigned { background: radial-gradient(120% 90% at 30% 15%, #f5222d, var(--ect-red-600) 55%, var(--ect-red-700)); box-shadow: 0 0 0 1px #ff5a61 inset, 0 8px 18px -10px var(--ect-red-glow); }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell.assigned small { padding: 1px 5px; border-radius: 5px; background: rgb(20 8 8 / .45); color: var(--ect-gold-200); }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget small { color: var(--ect-ivory-3); font-size: .74rem; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget strong { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget strong::before { content: "₡"; color: var(--ect-gold-300); font-size: .8em; margin-right: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget p { max-width: 24ch; text-align: right; color: var(--ect-ivory-3); font-size: .76rem; line-height: 1.35; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget.at-limit { box-shadow: 0 0 0 1px rgb(242 196 107 / .5) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .play-budget.at-limit p { color: var(--ect-warn); }
body.ec-app:has(.play-wizard) #contenido-principal .number-picker-heading, body.ec-app:has(.play-wizard) #contenido-principal .brush-controls { margin-top: 12px; color: var(--ect-ivory-3); font-size: .8rem; line-height: 1.45; }
body.ec-app:has(.play-wizard) #contenido-principal .number-picker-heading strong { display: block; color: var(--ect-ivory-2); font-size: .84rem; }
body.ec-app:has(.play-wizard) #contenido-principal .number-picker-heading small { display: block; }
body.ec-app:has(.play-wizard) #contenido-principal .active-paint-amount { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: rgb(227 6 19 / .14); box-shadow: 0 0 0 1px rgb(227 6 19 / .4) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .active-paint-amount small { display: block; font-size: .72rem; color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .play-groups { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ect-line); }
body.ec-app:has(.play-wizard) #contenido-principal .play-groups-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-groups-heading small { color: var(--ect-ivory-3); font-size: .8rem; }
body.ec-app:has(.play-wizard) #contenido-principal .play-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-top: 6px; border-radius: 12px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .play-group strong { font-size: .9rem; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .play-group small { display: block; color: var(--ect-ivory-2); font-size: .82rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
body.ec-app:has(.play-wizard) #contenido-principal .play-group-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
body.ec-app:has(.play-wizard) #contenido-principal .step-actions { display: flex; margin-top: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .step-actions .button { min-width: 120px; }

/* Resumen de jugada (paso 2) */
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary { margin-bottom: 12px; border-radius: 14px; background: var(--ect-s1); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; list-style: none; cursor: pointer; }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary > summary::-webkit-details-marker { display: none; }
body.ec-app:has(.play-wizard) #contenido-principal .running-summary-label { flex: 1; font-weight: 700; font-size: .9rem; }
body.ec-app:has(.play-wizard) #contenido-principal .running-summary-label small { display: block; color: var(--ect-ivory-3); font-weight: 500; font-size: .76rem; }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .running-summary-toggle { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ect-s3); color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary[open] > :not(summary) { margin: 0 14px; color: var(--ect-ivory-2); font-size: .84rem; }
body.ec-app:has(.play-wizard) #contenido-principal .play-running-summary[open] > :last-child { display: block; padding-bottom: 12px; }

/* Paso 3 — pago: SINPE / Tarjeta / Billetera distinguibles */
body.ec-app:has(.play-wizard) #contenido-principal .review-edit-actions { display: flex; gap: 14px; margin: -6px 0 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .review-layout { display: grid; gap: 14px; }
@media (min-width: 1024px) { body.ec-app:has(.play-wizard) #contenido-principal .review-layout { grid-template-columns: 1fr 1.1fr; align-items: start; } }
body.ec-app:has(.play-wizard) #contenido-principal .review-disclosure { border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .review-disclosure > summary { display: grid; gap: 2px; padding: 14px; cursor: pointer; font-weight: 700; }
body.ec-app:has(.play-wizard) #contenido-principal .review-disclosure > summary small { color: var(--ect-ivory-3); font-weight: 500; font-size: .8rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-disclosure[open] > :not(summary) { padding: 0 14px 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .review-heading h3 { font-family: var(--ect-serif); font-weight: 600; font-size: 1.12rem; margin-bottom: 10px; }
body.ec-app:has(.play-wizard) #contenido-principal .summary-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px; margin-bottom: 10px; border-radius: 14px; background: linear-gradient(135deg, #2a1d14, var(--ect-s2)); box-shadow: 0 0 0 1px rgb(225 186 104 / .28) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .summary-total > span { color: var(--ect-ivory-2); font-size: .88rem; }
body.ec-app:has(.play-wizard) #contenido-principal .summary-total strong { font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ect-gold-200); overflow-wrap: anywhere; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; cursor: pointer; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row > span { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--ect-s4); box-shadow: 0 0 0 1px var(--ect-line-2) inset; transition: background-color .18s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ect-ivory-2); transition: transform .18s ease, background-color .18s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row input:checked + span { background: #1f5b3a; box-shadow: 0 0 0 1px #3fa06a inset; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row input:checked + span::after { transform: translateX(18px); background: #e9fff1; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row input:focus-visible + span { outline: 3px solid var(--ect-focus); outline-offset: 3px; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row:has(input:checked) { box-shadow: 0 0 0 1.5px #3fa06a inset; background: linear-gradient(90deg, rgb(63 160 106 / .14), var(--ect-s2) 70%); }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row strong { display: block; }
body.ec-app:has(.play-wizard) #contenido-principal .toggle-row small { display: block; color: var(--ect-ivory-3); font-size: .8rem; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options { display: grid; gap: 8px; margin-top: 10px; }
@media (min-width: 560px) { body.ec-app:has(.play-wizard) #contenido-principal .payment-options { grid-template-columns: 1fr 1fr; } }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label { position: relative; display: block; cursor: pointer; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options input { position: absolute; opacity: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label > span { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; min-height: 84px; padding: 12px 14px; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; transition: box-shadow .15s ease, background-color .15s ease; }
body.ec-app:has(.play-wizard) #contenido-principal .pay-method-art { grid-row: 1 / 4; width: 52px; height: 40px; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options strong { font-size: .95rem; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options small { color: var(--ect-ivory-3); font-size: .78rem; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-selected { display: none; font-style: normal; font-size: .74rem; font-weight: 800; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(#pago-sinpe:checked) > span { background: linear-gradient(90deg, rgb(64 170 200 / .16), var(--ect-s2) 75%); box-shadow: 0 0 0 1.5px #5cc6dc inset; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(input:checked) small { color: var(--ect-ivory-2); }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(#pago-sinpe:checked) .payment-selected { display: block; color: #a9ecf7; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(#pago-tarjeta:checked) > span { background: linear-gradient(90deg, rgb(225 186 104 / .16), var(--ect-s2) 75%); box-shadow: 0 0 0 1.5px var(--ect-gold-400) inset; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(#pago-tarjeta:checked) .payment-selected { display: block; color: var(--ect-gold-200); }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
body.ec-app:has(.play-wizard) #contenido-principal .payment-options input:focus-visible + span { outline: 3px solid var(--ect-focus); outline-offset: 3px; }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-breakdown { display: grid; gap: 6px; margin: 12px 0; }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-breakdown > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--ect-line-2); }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-breakdown dt { color: var(--ect-ivory-2); font-size: .88rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-breakdown dt small { display: block; color: var(--ect-ivory-3); font-size: .74rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-breakdown dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
body.ec-app:has(.play-wizard) #contenido-principal .review-payment-note, body.ec-app:has(.play-wizard) #contenido-principal .checkout-confirmation, body.ec-app:has(.play-wizard) #contenido-principal .microcopy { color: var(--ect-ivory-3); font-size: .8rem; margin: 8px 0; }
body.ec-app:has(.play-wizard) #contenido-principal .play-summary .button.full + .microcopy + .button { margin-top: 4px; }
body.ec-app:has(.play-wizard) #contenido-principal .play-summary .action-money { min-height: 54px; font-size: 1.02rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-jugadas, body.ec-app:has(.play-wizard) #contenido-principal .review-draws { display: grid; gap: 6px; color: var(--ect-ivory-2); font-size: .86rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-caption, body.ec-app:has(.play-wizard) #contenido-principal .review-delivery-note { color: var(--ect-ivory-3); font-size: .8rem; }
body.ec-app:has(.play-wizard) #contenido-principal .review-stats { margin: 0 0 10px; }
body.ec-app:has(.play-wizard) #contenido-principal .review-stats dd { margin: 0; font-weight: 700; }

/* Diálogo de monto */
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog { width: min(440px, calc(100vw - 24px)); padding: 20px; border: 0; border-radius: 22px; background: var(--ect-s1); color: var(--ect-ivory); box-shadow: 0 0 0 1px var(--ect-line-2) inset, 0 40px 80px -20px #000; }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog::backdrop { background: rgb(5 3 3 / .72); backdrop-filter: blur(4px); }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog h2 { font-family: var(--ect-serif); font-size: 1.35rem; }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog p { color: var(--ect-ivory-2); font-size: .88rem; margin-bottom: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog input { width: 100%; margin: 6px 0 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .paint-amount-dialog [data-close-amount] { width: 44px; min-height: 44px; padding: 0; font-size: 1.3rem; }


/* =====================================================================
   FASE 2 · Componentes globales del portal
   Especificidad baja (body.ec-app .x): reemplaza la capa genérica heredada,
   pero respeta reglas propias de cada módulo (casino, raspas, ron, rifa…).
   ===================================================================== */
body.ec-app .page-heading h1,
body.ec-app .royal-heading-copy h1,
body.ec-app .benefit-hero h1,
body.ec-app .ron-page-heading h1,
body.ec-app .raspas-page > .section-title h1,
body.ec-app .purchase-status > h1,
body.ec-app :is(.ron-table-heading, .ron-hand-panel .section-title) h2 { font-family: var(--ect-serif); font-weight: 600; letter-spacing: -.012em; }
/* Compra: conteo de números del resumen con contraste AA (antes 2,8:1). */
body.ec-app .purchase-draw-summary header span { color: var(--ect-ivory-2); }
/* Casillas de confirmación (pagos, pruebas): objetivo de 24 px y tono dorado. */
body.ec-app :is(.benefit-choice, .remember-device, .rifa-aceptacion, .ron-accept) > input[type=checkbox] { inline-size: 24px; block-size: 24px; accent-color: var(--ect-gold-300); flex: 0 0 auto; }
body.ec-app .eyebrow { color: var(--ect-gold-300); font-weight: 700; letter-spacing: .14em; }
body.ec-app .button { border-radius: 12px; font-weight: 700; text-shadow: none; }
body.ec-app .button.action-navigation,
body.ec-app .button.primary {
  color: #fff; background: linear-gradient(180deg, var(--ect-red-500), var(--ect-red-600)); border: 1px solid #ff4a52;
  box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 10px 22px -14px var(--ect-red-glow); }
body.ec-app .button.action-navigation:hover,
body.ec-app .button.primary:hover { background: linear-gradient(180deg, #ee1a26, var(--ect-red-600)); }
body.ec-app .button.ghost,
body.ec-app .button.secondary { color: var(--ect-ivory); background: transparent; border: 1px solid var(--ect-line-2); box-shadow: none; }
body.ec-app .button.ghost:hover,
body.ec-app .button.secondary:hover { background: var(--ect-s3); border-color: var(--ect-line-3); }
body.ec-app .button:disabled,
body.ec-app .button[aria-disabled=true] { color: var(--ect-ivory-3); background: var(--ect-s2); border-color: var(--ect-line); box-shadow: none; }
body.ec-app :is(.surface, .form-card, .list-card, .metric-card) { border-color: var(--ect-line-2); }
body.ec-app input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),
body.ec-app select, body.ec-app textarea {
  border-radius: 12px; border-color: var(--ect-line-2); background-color: var(--ect-bg-2); color: var(--ect-ivory); font-family: var(--ect-sans); }
body.ec-app input:not([type=checkbox]):not([type=radio]):not([type=range]):focus-visible,
body.ec-app select:focus-visible, body.ec-app textarea:focus-visible { border-color: var(--ect-gold-400); outline: 3px solid rgb(248 220 159 / .45); outline-offset: 1px; }
body.ec-app ::placeholder { color: var(--ect-ivory-3); opacity: 1; }
body.ec-app .alert { border-radius: 14px; }
body.ec-app .alert.error { color: var(--ect-err); }
body.ec-app .empty-state h3 { font-family: var(--ect-serif); font-weight: 600; }

/* =====================================================================
   Billetera, movimientos y pagos SINPE / tarjeta
   ===================================================================== */
body.ec-app:is(:has(.wallet-page), :has(.history-filters), :has([data-live-part=compra])) #contenido-principal .page-heading:not(.tropical-showcase):not(.play-heading) {
  position: relative; isolation: isolate; overflow: hidden; min-height: 112px; padding: 18px; border: 0; border-radius: var(--ect-r-lg);
  background: radial-gradient(420px 220px at 100% 0, rgb(227 6 19 / .3), transparent 70%), var(--ect-s1); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .page-heading .section-art { opacity: .55; }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .page-heading h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }

/* Saldo: tarjeta digital propia, sin imitar una tarjeta bancaria real. */
body.ec-app:has(.wallet-page) #contenido-principal .wallet-hero {
  position: relative; isolation: isolate; overflow: hidden; padding: 20px; border: 0; border-radius: 24px;
  background-color: #160d0e;
  background-image:
    radial-gradient(360px 220px at 105% -10%, rgb(227 6 19 / .55), transparent 70%),
    radial-gradient(260px 160px at -10% 120%, rgb(225 186 104 / .16), transparent 70%),
    linear-gradient(160deg, #2a1517, #160d0e 70%);
  box-shadow: 0 0 0 1px rgb(242 216 149 / .22) inset, 0 24px 48px -28px #000; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-hero::before,
body.ec-app:has(.wallet-page) #contenido-principal .wallet-hero::after { display: none; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-card-signature span { color: var(--ect-ivory-2); font-family: var(--ect-serif); font-weight: 700; letter-spacing: .08em; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-card-signature small { color: var(--ect-ivory-2); font-family: var(--ect-sans); letter-spacing: .14em; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-card-signature svg { color: var(--ect-gold-300); stroke: var(--ect-gold-300); }
body.ec-app:has(.wallet-page) #contenido-principal .balance-label { color: var(--ect-ivory-2); }
body.ec-app:has(.wallet-page) #contenido-principal .balance-amount { color: var(--ect-ivory); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: none; }
body.ec-app:has(.wallet-page) #contenido-principal .balance-currency { color: var(--ect-gold-300); }
body.ec-app:has(.wallet-page) #contenido-principal .balance-details > span { border: 0; border-radius: 14px; background: rgb(14 10 10 / .5); box-shadow: 0 0 0 1px var(--ect-line-2) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .balance-details b { color: var(--ect-ivory); font-variant-numeric: tabular-nums; }
body.ec-app:has(.wallet-page) #contenido-principal .balance-details .wallet-symbol { color: var(--ect-gold-300); }

/* Secciones: control segmentado. */
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links { gap: 6px; padding: 5px; border-radius: 18px; background: var(--ect-s1); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links a {
  min-height: 64px; border: 0; border-radius: 14px; background: transparent; box-shadow: none; color: var(--ect-ivory-2); text-decoration: none; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links a::before,
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links a::after { display: none; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links a:hover { background: var(--ect-s3); color: var(--ect-ivory); }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links a[aria-selected=true] {
  color: #fff; background: linear-gradient(180deg, var(--ect-red-600), var(--ect-red-700)); box-shadow: 0 1px 0 rgb(255 160 170 / .3) inset, 0 8px 18px -10px var(--ect-red-glow); text-decoration: none; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-section-links svg { color: currentColor; }

body.ec-app:has(.wallet-page) #contenido-principal :is(.form-card, .wallet-withdrawal-history, .section-block, .wallet-prizes) {
  border: 0; border-radius: var(--ect-r-lg); background: var(--ect-s1); box-shadow: var(--ect-shadow), 0 0 0 1px var(--ect-line) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .section-block { padding: 18px; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-panel-heading h2 { font-family: var(--ect-serif); font-weight: 600; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-panel-heading { border-bottom-color: var(--ect-line); }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-panel-icon { border: 0; border-radius: 12px; color: var(--ect-gold-300); background: rgb(225 186 104 / .12); box-shadow: 0 0 0 1px rgb(225 186 104 / .3) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-money-field { border: 0; border-radius: 12px; background: var(--ect-bg-2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-money-field > span { border: 0; background: none; color: var(--ect-gold-300); }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-money-field input { border: 0; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-money-field:focus-within { box-shadow: 0 0 0 2px var(--ect-gold-400) inset; }

/* Medios: SINPE (cian), tarjeta (dorado), IBAN (azul); seleccionado con marca y texto. */
body.ec-app #contenido-principal .compact-options label > span {
  border: 0; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; color: var(--ect-ivory); }
body.ec-app #contenido-principal .compact-options label > span small { color: var(--ect-ivory-3); }
body.ec-app #contenido-principal .compact-options label > span .wallet-symbol { color: var(--ect-ivory-2); }
body.ec-app #contenido-principal .compact-options input:is([value=Sinpe], [value=SinpeMovil]):checked + span { background: linear-gradient(135deg, rgb(64 170 200 / .2), var(--ect-s2) 70%); box-shadow: 0 0 0 2px #5cc6dc inset; }
body.ec-app #contenido-principal .compact-options input:is([value=Sinpe], [value=SinpeMovil]):checked + span .wallet-symbol { color: #a9ecf7; }
body.ec-app #contenido-principal .compact-options input[value=Onvo]:checked + span { background: linear-gradient(135deg, rgb(225 186 104 / .2), var(--ect-s2) 70%); box-shadow: 0 0 0 2px var(--ect-gold-400) inset; }
body.ec-app #contenido-principal .compact-options input[value=Onvo]:checked + span .wallet-symbol { color: var(--ect-gold-200); }
body.ec-app #contenido-principal .compact-options input[value=Iban]:checked + span { background: linear-gradient(135deg, rgb(120 160 255 / .18), var(--ect-s2) 70%); box-shadow: 0 0 0 2px #8fb0ff inset; }
body.ec-app #contenido-principal .compact-options input:checked + span small { color: var(--ect-ivory-2); }
body.ec-app #contenido-principal .compact-options input:focus-visible + span { outline: 3px solid var(--ect-focus); outline-offset: 3px; }

body.ec-app:has(.wallet-page) #contenido-principal .withdrawal-status { border: 0; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; }
body.ec-app:has(.wallet-page) #contenido-principal .withdrawal-status.open .withdrawal-status-dot { background: var(--ect-ok); box-shadow: 0 0 10px rgb(143 214 168 / .7); }
body.ec-app:has(.wallet-page) #contenido-principal .field-help { color: var(--ect-ivory-3); }

/* Movimientos: entradas en verde, salidas en marfil (sin texto rojo sobre oscuro). */
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .movement-row {
  border: 0; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .movement-icon { border: 0; border-radius: 50%; background: var(--ect-s3); color: var(--ect-ivory-2); }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .movement-icon.positive { background: rgb(143 214 168 / .14); color: var(--ect-ok); }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .movement-icon.is-prize { background: rgb(225 186 104 / .16); color: var(--ect-gold-300); }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .movement-detail time,
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .list-value small { color: var(--ect-ivory-3); }
body.ec-app:is(:has(.wallet-page), :has(.history-filters)) #contenido-principal .list-value strong { font-variant-numeric: tabular-nums; }

body.ec-app:has(.wallet-page) #contenido-principal .wallet-prizes { background: radial-gradient(300px 160px at 100% 0, rgb(225 186 104 / .18), transparent 70%), var(--ect-s1); }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-prizes-amount { color: var(--ect-gold-200); font-variant-numeric: tabular-nums; }
body.ec-app:has(.wallet-page) #contenido-principal .wallet-prizes-icon { border: 0; color: var(--ect-gold-300); background: rgb(225 186 104 / .12); }

/* Pago SINPE pendiente (billetera y compra): datos legibles y validación visible. */
body.ec-app .sinpe-payment {
  border: 0; border-radius: var(--ect-r-lg); background: radial-gradient(360px 200px at 100% 0, rgb(64 170 200 / .14), transparent 70%), var(--ect-s1);
  box-shadow: 0 0 0 1px rgb(92 198 220 / .35) inset, var(--ect-shadow); }
body.ec-app .sinpe-payment .payment-card-heading h2 { font-family: var(--ect-serif); font-weight: 600; }
body.ec-app .sinpe-payment .payment-card-heading small { color: #a9ecf7; letter-spacing: .1em; }
body.ec-app .sinpe-payment .payment-method-icon { border: 0; color: #06292b; background: linear-gradient(180deg, #bdf3fb, #5cc6dc); }
body.ec-app .sinpe-payment .payment-total { border: 0; border-radius: 16px; background: var(--ect-bg-2); box-shadow: 0 0 0 1px var(--ect-line-2) inset; }
body.ec-app .sinpe-payment .payment-total strong { color: var(--ect-gold-300); font-variant-numeric: tabular-nums; }
body.ec-app .sinpe-payment .payment-details > div { border: 0; border-radius: 14px; background: var(--ect-s2); box-shadow: 0 0 0 1px var(--ect-line) inset; }
body.ec-app .sinpe-payment .payment-details small { color: var(--ect-ivory-3); }
body.ec-app .sinpe-payment .payment-details [data-copy-row] strong { color: var(--ect-ivory); }
body.ec-app .sinpe-payment .payment-verifying { border: 0; border-radius: 14px; background: rgb(64 170 200 / .1); box-shadow: 0 0 0 1px rgb(92 198 220 / .35) inset; }
body.ec-app .sinpe-payment .payment-verifying strong { color: #a9ecf7; }
body.ec-app .sinpe-payment .payment-validation-icon { color: #5cc6dc; }
body.ec-app .card-payment { border: 0; border-radius: var(--ect-r-lg); background: radial-gradient(360px 200px at 100% 0, rgb(225 186 104 / .14), transparent 70%), var(--ect-s1); box-shadow: 0 0 0 1px rgb(225 186 104 / .35) inset; }

/* =====================================================================
   Cuenta: ingreso y registro (cabecera sin billetera)
   ===================================================================== */
body.ec-app .topbar:not(:has(.header-wallet)) .brand > span { display: grid; }
body.ec-app .topbar:not(:has(.header-wallet)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions"; }
body.ec-app :is(.auth-copy h1, .auth-card h2) { font-family: var(--ect-serif); font-weight: 600; letter-spacing: -.01em; }
body.ec-app .auth-card { border: 0; border-radius: var(--ect-r-lg); background: var(--ect-s1); box-shadow: var(--ect-shadow), 0 0 0 1px var(--ect-line) inset; }
body.ec-app .auth-card h2::before { background: var(--ect-red-500); }
/* Inicio heredaba un panel propio; se alinea con el resto del tema. */
body.ec-app:has(.home-welcome) { --ec-future-panel: #1e1213; --ec-future-raised: #281719; --ec-future-inset: #140e0e; --ec-future-line: #4a3434; --ec-red: #c3060f; --ec-ruby: #e30613; }

/* =====================================================================
   Resultados, tiquetes y módulos de juego (ajustes sobre su identidad propia)
   ===================================================================== */
body.ec-app :is(.themed-heading, .tickets-heading, .raspas-hero, .casino-hero) h1 { font-family: var(--ect-serif); font-weight: 600; letter-spacing: -.01em; }
body.ec-app .results-tabs a[aria-current=page] {
  color: #fff; border-color: #ff4a52; background: linear-gradient(180deg, var(--ect-red-600), var(--ect-red-700));
  box-shadow: 0 1px 0 rgb(255 160 170 / .3) inset, 0 8px 18px -10px var(--ect-red-glow); text-decoration: none; }
body.ec-app .ticket-filter-tabs a.selected { color: #fff; border-color: #ff4a52; background: linear-gradient(180deg, var(--ect-red-600), var(--ect-red-700)); }
body.ec-app .raspas-wallet .button { white-space: nowrap; }
body.ec-app .casino-bet-range span { color: var(--ect-ivory-2); }

/* Pestañas de sección (cuenta, agentes…) y filete de títulos con el rojo de marca. */
body.ec-app [data-section-tabs] a[aria-selected=true] {
  color: #fff; border-color: #ff4a52; background: linear-gradient(180deg, var(--ect-red-600), var(--ect-red-700));
  box-shadow: 0 1px 0 rgb(255 160 170 / .3) inset, 0 8px 18px -10px var(--ect-red-glow); text-decoration: none; }
body.ec-app [data-section-tabs] a[aria-selected=true] svg { color: #fff; }
body.ec-app :is(.surface, .benefit-panel, .form-card):not(.premium-plan) > h2::before { background: linear-gradient(180deg, var(--ect-red-500), var(--ect-red-700)); }
body.ec-app :is(.surface, .form-card) > h2 { font-family: var(--ect-serif); font-weight: 600; }

/* =====================================================================
   Ajustes tras la batería de navegador (2026-11-09)
   ===================================================================== */
/* Continuar (avanzar) se distingue de Comprar (dinero): champán plano frente a dorado metálico. */
body.ec-app .button.action-continue:not(:disabled), body.ec-app:has(.play-wizard) #contenido-principal .button.action-continue:not(:disabled) {
  background: linear-gradient(180deg, #f6e2b0, #e9cb86); border-color: #c79c4f; box-shadow: 0 1px 0 rgb(255 250 235 / .7) inset, 0 8px 18px -12px rgb(225 186 104 / .55); }
body.ec-app .button.action-continue:hover:not(:disabled), body.ec-app:has(.play-wizard) #contenido-principal .button.action-continue:hover:not(:disabled) { background: linear-gradient(180deg, #fbe9bf, #efd394); }
/* Dinero: el pago con billetera y el total por pagar usan dorado, no rojo de navegación. */
body.ec-app .wallet-payment-alternative > summary.button,
body.ec-app .wallet-payment-alternative .button.primary {
  color: var(--ect-gold-ink); background: var(--ect-gold-metal); border: 1px solid #a77a2c;
  box-shadow: 0 1px 0 rgb(255 248 225 / .7) inset, 0 -1px 0 rgb(120 80 20 / .35) inset, 0 10px 24px -12px rgb(225 186 104 / .65); }
body.ec-app .wallet-payment-alternative > summary.button:hover,
body.ec-app .wallet-payment-alternative .button.primary:hover { background: var(--ec-action-gold-hover); }
body.ec-app .payment-total strong { color: var(--ect-gold-300); }
/* Inicio: título de sección con filete rojo sin tapar la primera letra. */
body.ec-app:has(.home-welcome) #contenido-principal .home-modalities .section-title { position: relative; padding-left: 12px; }
/* Mosaicos pequeños (Juegos, Raspas): velo más denso para que el título contraste sobre arte claro. */
body.ec-app:has(.home-welcome) #contenido-principal :is(.modality-games, .modality-raspas)::before {
  background: linear-gradient(180deg, rgb(14 10 10 / .2) 0%, rgb(14 10 10 / .72) 42%, rgb(14 10 10 / .96) 100%); }
/* Inicio: el regalo va después del banner con separación; en escritorio, al lado del banner. */
body.ec-app:has(.home-welcome) #contenido-principal .home-free-scratch { margin-top: 16px; }
@media (min-width: 1200px) {
  body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby:has(> .home-free-scratch) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); column-gap: 20px; align-items: start; }
  body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby:has(> .home-free-scratch) > * { grid-column: 1 / -1; min-width: 0; order: 0; }
  body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby:has(> .home-free-scratch) > .home-benefits-stage { grid-column: 1; }
  body.ec-app:has(.home-welcome) #contenido-principal .royal-lobby:has(> .home-free-scratch) > .home-free-scratch { grid-column: 2; margin-top: 28px; }
}
/* Inicio: el arte cubre toda la tarjeta (anula anchos máximos heredados). */
body.ec-app:has(.home-welcome) #contenido-principal .home-modality :is(.modality-tiempos-art, .modality-chance-art, .modality-casino-suite) { max-width: none; max-height: none; min-width: 0; }

/* Tiempos · paso 1: sorteos en pares (3 columnas desde 768 px), tarjeta vertical. */
body.ec-app:has(.play-wizard) #contenido-principal .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { body.ec-app:has(.play-wizard) #contenido-principal .draw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option { grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; gap: 8px; min-height: 0; padding: 12px; overflow: hidden; isolation: isolate; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option > :not(.draw-backdrop) { position: relative; z-index: 1; }
/* El pseudo-elemento del botón debe seguir cubriendo la tarjeta completa. */
body.ec-app:has(.play-wizard) #contenido-principal .draw-option .draw-toggle { position: static; width: 100%; min-width: 0; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-name { overflow-wrap: break-word; hyphens: manual; line-height: 1.2; }
/* Bandera o logo como fondo tenue de la tarjeta (identidad del sorteo sin saturar). */
body.ec-app:has(.play-wizard) #contenido-principal .draw-option .draw-backdrop { display: block; position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; margin: 0; border: 0; border-radius: inherit; opacity: .2; object-fit: cover; pointer-events: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgb(22 12 14 / .86), rgb(22 12 14 / .35)); pointer-events: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option :is(.draw-detail, .draw-name, .draw-payouts, .draw-close) { background: none; box-shadow: none; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-option { padding-top: 14px; }
body.ec-app:has(.play-wizard) #contenido-principal [data-play-step="0"] > .button.full { order: 99; margin-top: 12px; }
body.ec-app:has(.play-wizard) #contenido-principal .draw-toggle { min-height: 44px; }

/* Objetivos táctiles de 44 px en tiquetes recientes. */
body.ec-app .recent-ticket .button { min-height: 44px; }

/* Color sólido de respaldo bajo los degradados dorados y rojos (lectura con imágenes
   desactivadas o modos de alto contraste, y cálculo de contraste fiable). */
body.ec-app :is(.button.action-continue, .button.action-money, .button.action-deposit):not(:disabled) { background-color: #e1ba68; }
body.ec-app:has(.play-wizard) #contenido-principal .amount-pills button:is(.active, [aria-pressed="true"]) { background-color: #e1ba68; }
body.ec-app:has(.play-wizard) #contenido-principal .number-cell.assigned { background-color: var(--ect-red-600); }

/* Menú de escritorio: el acceso de agente conserva su tono dorado. */
@media (min-width: 1024px) {
  body.ec-app .topbar .bottom-nav .nav-agent { color: var(--ect-gold-300); }
  body.ec-app .topbar .bottom-nav .nav-agent[aria-current="page"] { color: var(--ect-gold-200); }
}

/* Pagar con billetera: el pasar el cursor no cambia el dorado, solo lo aclara. */
body.ec-app .wallet-payment-alternative > summary.button:hover { background: var(--ect-gold-metal); filter: brightness(1.06); }

/* Raspas con texto ampliado: etiquetas y premio se acomodan dentro de la tarjeta. */
body.ec-app .raspa-category-top { flex-wrap: wrap; gap: 4px; max-width: calc(100% - 14px); }
body.ec-app .raspa-category-top .raspa-status { white-space: normal; max-width: 100%; }
body.ec-app .raspa-prize-banner strong { overflow-wrap: anywhere; }
body.ec-app .raspa-price-row { flex-wrap: wrap; min-width: 0; gap: 4px; }

/* Las imágenes nunca deben competir con las indicaciones pequeñas. */
body.ec-app .games-hub-copy > small { justify-self: start; max-width: 100%; padding: 4px 7px; border-radius: 6px; background: #1e1213; color: #f2d895; }
body.ec-app .form-card .themed-heading > .muted { padding: 10px; border-radius: 10px; background: #1e1213; color: #f7efe4; }
body.ec-app .form-card .themed-heading > .muted strong { color: inherit; }
body.ec-app:has(.play-wizard) #contenido-principal .active-paint-amount { flex-wrap: wrap; }
body.ec-app:has(.play-wizard) #contenido-principal .active-paint-amount .button { flex: 0 1 9rem; width: auto; min-width: 0; max-width: 100%; padding: 8px; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
body.ec-app:has(.play-wizard) #contenido-principal .times-tickets .button { white-space: normal; height: auto; min-width: 0; overflow-wrap: anywhere; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .step-actions { flex-wrap: wrap; }
body.ec-app:has(.play-wizard) #contenido-principal .play-wizard .step-actions .button { min-width: 0; max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; }
body.ec-app .raspas-wallet { flex-wrap: wrap; }
body.ec-app .raspas-wallet > div { flex: 1 1 12rem; min-width: 0; }
body.ec-app .raspas-wallet > .button { max-width: 100%; white-space: normal; }

/* Conservar las ilustraciones como fondo completo, también en móvil. */
body.ec-app .royal-section-heading .section-art,
body.ec-app .games-hub-casino .games-hub-art { display: block; inset: 0; width: 100%; height: 100%; }
body.ec-app .royal-section-heading .section-art { opacity: .55; }
body.ec-app .royal-section-heading::before { background: linear-gradient(90deg, rgb(30 18 19 / .96), rgb(30 18 19 / .86) 55%, rgb(30 18 19 / .3)); }

/* Longer mode eyebrow on the play heading wraps over the darker part of the gradient: keep AA contrast. */
body.ec-app:has(.play-wizard) #contenido-principal .play-heading .eyebrow { color: #fff3d6; }
