/* =========================================================
   Club Fortuna · Landing V2 — mobile first
   Base < 600 px (teléfono) · 600 tablet chica · 768 tablet · 1100 escritorio (sidebar fija)
   Plan y tokens: docs/design/landing-v2/DESIGN.md
   ========================================================= */

@font-face {
  font-family: "Barlow SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/barlow-semi-condensed-700-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --night: #08101c;
  --table: #0f1828;
  --felt: #16223a;
  --felt-2: #1e2c48;
  --gold: #e9b949;
  --gold-hi: #f4cf6e;
  --gold-ink: #1b1405;
  --gold-wash: rgba(233, 185, 73, .12);
  --ivory: #f2eee4;
  --mist: #a9b3c6;
  --dusk: #8792a8;
  --line: rgba(160, 185, 230, .12);
  --line-2: rgba(160, 185, 230, .2);
  --in: #6fd39b;
  --warn: #ff8a80;

  --display: "Barlow SC", "Arial Narrow", system-ui, sans-serif;
  /* Roboto primero: es la fuente de sistema de Android (90 % del público); iOS/Windows caen a la suya. */
  --ui: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --r-sheet: 20px;
  --r-card: 14px;
  --r-ctl: 10px;

  --gutter: 16px;
  --topbar-h: 56px;
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 18px 48px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* Alias de los tokens V1: widget.css, wallet.css y el overlay de staging (juegos.css) los usan. */
  --bg: var(--night); --bg-deep: #050a12; --bg-soft: var(--table);
  --surface-1: var(--table); --surface-2: var(--felt); --card: var(--table); --panel: var(--table);
  --text: var(--ivory); --cream: var(--ivory); --muted: var(--mist); --faint: var(--dusk);
  --gold-light: var(--gold-hi); --gold-deep: #9c7420; --gold-soft: var(--gold-wash);
  --line-strong: rgba(233, 185, 73, .3); --line-soft: var(--line);
  --green: var(--in); --danger: var(--warn); --ink: var(--gold-ink);
  --r-sm: var(--r-ctl); --r-md: var(--r-card); --r-lg: var(--r-sheet); --r-pill: 999px;
  --type-h2: 1.5rem; --type-small: .8125rem; --type-label: .75rem;
  --focus-ring: 2px solid var(--gold-hi);
}
@media (max-width: 359px) { :root { --gutter: 12px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ivory);
  background: var(--night);
  font: 400 15px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img, svg, video, picture { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus { outline: none; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
::selection { color: var(--gold-ink); background: var(--gold-hi); }
/* superficies del navegador con la paleta: cursor, controles nativos y barras de desplazamiento */
:root { caret-color: var(--gold); accent-color: var(--gold); scrollbar-color: var(--felt-2) var(--night); }
input, textarea { caret-color: var(--gold); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico, .cf-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cf-icon-sm { width: 16px; height: 16px; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 5000; padding: 10px 14px; border-radius: var(--r-ctl); color: var(--gold-ink); background: var(--gold); font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r-ctl);
  font: 600 15px/1.1 var(--ui); white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn .ico { width: 18px; height: 18px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-gold { color: var(--gold-ink); background: var(--gold); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-quiet, .btn-outline { color: var(--ivory); background: var(--felt); border-color: var(--line); }
.btn-quiet:hover, .btn-outline:hover { background: var(--felt-2); border-color: var(--line-2); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; color: var(--dusk); background: var(--felt); border-color: var(--line); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
  padding: 0; border: 0; border-radius: var(--r-ctl); color: var(--ivory); background: transparent;
}
.icon-btn:hover { background: var(--felt); }

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 4px;
  height: var(--topbar-h);
  padding: 0 calc(var(--gutter) - 6px) 0 6px;
  background: var(--table);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding-right: 4px; }
.brand-mark { width: 32px; height: 32px; border-radius: 50%; }
.brand-name { max-width: 4.6em; font: 700 16px/.95 var(--display); letter-spacing: .02em; }
.topbar-search { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.header-actions .btn-sm { min-height: 44px; padding: 0 12px; }
.account-btn {
  display: none; align-items: center; gap: 8px; max-width: 180px; min-height: 44px; padding: 0 4px;
  border: 0; border-radius: var(--r-ctl); background: transparent;
}
.account-btn:hover { background: var(--felt); }
.cf-user-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; color: var(--gold-hi); background: var(--felt); border: 1px solid var(--line-2); }
.cf-account-label { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.account-btn:disabled { cursor: progress; opacity: .7; }
body.is-auth .header-actions [data-auth] { display: none; }
body.is-auth .account-btn { display: inline-flex; }
/* teléfonos: sin sesión el header lleva dos botones; el escudo solo (logo discreto) deja sitio al pulgar */
@media (max-width: 399px) { body:not(.is-auth) .brand-name { display: none; } }
@media (max-width: 359px) {
  .brand-name { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 0 10px; font-size: 13.5px; }
}
@media (max-width: 300px) { .header-actions [data-auth="login"] { display: none; } }

/* =========================================================
   SHELL · drawer (móvil/tablet) → sidebar (escritorio)
   ========================================================= */
.shell { position: relative; }
.sidenav {
  position: fixed; inset: 0 auto 0 0; z-index: 80;
  display: flex; flex-direction: column; gap: 6px;
  width: min(86vw, 320px);
  padding: 8px 12px calc(16px + var(--safe-b));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--table);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .24s var(--ease), visibility 0s linear .24s;
}
body.drawer-open .sidenav { transform: none; visibility: visible; transition: transform .24s var(--ease); box-shadow: var(--shadow); }
.drawer-scrim { position: fixed; inset: 0; z-index: 79; background: rgba(3, 6, 12, .6); }
body.drawer-open { overflow: hidden; }
.sidenav-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-left: 8px; }
.sidenav-title { font: 700 18px/1 var(--display); }
.site-nav { display: grid; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); }
.sidenav-head + .site-nav { border-top: 0; }
.site-nav a, .nav-soon {
  --ico: var(--ico-home);
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--mist); font-weight: 600; font-size: 15px;
}
.site-nav a::before, .nav-soon::before {
  content: ""; width: 20px; height: 20px; flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: var(--ico) center / 20px 20px no-repeat; mask: var(--ico) center / 20px 20px no-repeat;
}
.site-nav a:hover { color: var(--ivory); background: var(--felt); }
.site-nav a[aria-current="page"] { color: var(--ivory); background: var(--felt); box-shadow: inset 3px 0 0 var(--gold); }
.site-nav a[aria-current="page"]::before { background: var(--gold); }
.nav-soon { cursor: default; color: var(--dusk); }
.nav-soon small { margin-left: auto; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--mist); }
.sidenav-support { display: grid; gap: 10px; margin-top: auto; padding: 14px 4px 4px; border-top: 1px solid var(--line); }
.sidenav-note { display: flex; align-items: center; gap: 8px; color: var(--dusk); font-size: 12.5px; }
.sidenav-note .ico { width: 16px; height: 16px; }
.sidenav-collapse { display: none; }

/* Íconos del menú: máscaras SVG por destino (los enlaces no pueden llevar markup extra:
   <a href="#inicio">Inicio</a> es un ancla exacta del build de staging). */
:root {
  --ico-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M4 11 12 4.5l8 6.5v8a1 1 0 0 1-1 1h-4.5v-6h-5v6H5a1 1 0 0 1-1-1v-8Z'/%3E%3C/svg%3E");
  --ico-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 3.8 2.5 5.3 5.7.7-4.2 4 1.1 5.7L12 16.7l-5.1 2.8L8 13.8l-4.2-4 5.7-.7Z'/%3E%3C/svg%3E");
  --ico-seven: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4' width='17' height='16' rx='3'/%3E%3Cpath d='M8.5 8.5h7l-4 7.5M9.8 12.2h4'/%3E%3C/svg%3E");
  --ico-live: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M12 3.5v6M12 14.5v6M3.5 12h6M14.5 12h6'/%3E%3C/svg%3E");
  --ico-gift: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='4' y='9' width='16' height='11' rx='1.5'/%3E%3Cpath d='M3.5 9h17M12 9v11M12 9c-1.5-3.5-5-4-5-1.8C7 9 12 9 12 9Zm0 0c1.5-3.5 5-4 5-1.8C17 9 12 9 12 9Z'/%3E%3C/svg%3E");
  --ico-soon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.5h10M7 20.5h10M8 3.5c0 4.5 8 4.5 8 8.5s-8 4-8 8.5M16 3.5c0 4.5-8 4.5-8 8.5'/%3E%3C/svg%3E");
  --ico-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 19.5s-7-4.3-7-9.6A3.9 3.9 0 0 1 12 7.6a3.9 3.9 0 0 1 7 2.3c0 5.3-7 9.6-7 9.6Z'/%3E%3C/svg%3E");
  --ico-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
  --ico-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8.2' r='3.5'/%3E%3Cpath d='M4.85 19.6c.78-3.72 3.2-5.72 7.15-5.72s6.37 2 7.15 5.72'/%3E%3C/svg%3E");
  --ico-ball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m12 8 3.3 2.4-1.3 3.9h-4l-1.3-3.9Z'/%3E%3C/svg%3E");
  --ico-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='3'/%3E%3Cpath d='M3.5 19c.6-3 2.6-4.6 5.5-4.6s4.9 1.6 5.5 4.6M15.5 6.5a3 3 0 0 1 0 5.6M17 14.6c2 .5 3.2 2 3.5 4.4'/%3E%3C/svg%3E");
  --ico-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Crect x='4' y='4' width='7' height='7' rx='2'/%3E%3Crect x='13' y='4' width='7' height='7' rx='2'/%3E%3Crect x='4' y='13' width='7' height='7' rx='2'/%3E%3Crect x='13' y='13' width='7' height='7' rx='2'/%3E%3C/svg%3E");
}
.site-nav a[href="#populares"] { --ico: var(--ico-star); }
.site-nav a[href="#tragamonedas"] { --ico: var(--ico-seven); }
.site-nav a[href="#en-vivo"] { --ico: var(--ico-live); }
.site-nav a[href="#con-bono"] { --ico: var(--ico-gift); }
.site-nav a[href="#proximamente"] { --ico: var(--ico-soon); }
.site-nav a[href="#favoritos"] { --ico: var(--ico-heart); }
.site-nav a[href="#recientes"] { --ico: var(--ico-clock); }
.site-nav a[href="#cuenta"] { --ico: var(--ico-user); }
.site-nav a[href="#juegos"] { --ico: var(--ico-grid); }
.nav-soon[data-ico="deportes"] { --ico: var(--ico-ball); }
.nav-soon[data-ico="referidos"] { --ico: var(--ico-users); }

/* =========================================================
   MAIN
   ========================================================= */
main { display: block; min-width: 0; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 80px); }
.chat-scrim { position: fixed; inset: 0; z-index: 9998; background: rgba(3, 6, 12, .55); }
@media (min-width: 1100px) { .chat-scrim { display: none !important; } }
body.drawer-open #cf-widget-root, body.sheet-open #cf-widget-root { visibility: hidden; }
main:focus { outline: none; }
.view { padding: 12px var(--gutter) 0; }

/* ---------- hero (carrusel) ---------- */
.hero { display: grid; gap: 12px; }
.carousel { position: relative; min-width: 0; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--r-card);
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; gap: 8px;
  min-height: 148px; padding: 14px 16px 28px;
  overflow: hidden;
  background: #0b1a3f;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
/* fondo ilustrado de cada banner (arte a la derecha, campo azul liso a la izquierda para el texto) */
.slide-bg { position: absolute; inset: 0; z-index: 0; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.slide-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 3px; min-width: 0; max-width: 60%; }
/* rótulo honesto de la diapositiva de demostración: badge en la esquina, no etiqueta sobre el título */
.slide-badge { position: absolute; z-index: 2; right: 12px; top: 12px; padding: 2px 8px; border: 1px dashed rgba(244, 207, 110, .6); border-radius: 6px; color: var(--gold-hi); font-size: 12px; font-weight: 600; }
.slide-cta-meta { margin-left: 2px; font-size: 12px; font-weight: 500; opacity: .75; }
.slide-title { font: 700 21px/1.05 var(--display); letter-spacing: .005em; text-wrap: balance; }
.slide-text { color: var(--mist); font-size: 13.5px; line-height: 1.35; }
.slide-cta { margin-top: 6px; min-height: 44px; }
@media (max-width: 399px) { .slide-text { display: none; } .slide-cta { margin-top: 8px; } }
@media (max-width: 599px) and (max-height: 640px) {
  .slide { min-height: 116px; padding-top: 12px; padding-bottom: 24px; }
  .slide-title { font-size: 19px; }
  .slide-cta { margin-top: 6px; }
  .lobby-bar { padding-top: 8px; padding-bottom: 6px; }
}
.carousel-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; pointer-events: none; }
.carousel-prev, .carousel-next { display: none; }
.carousel-dots { display: flex; pointer-events: auto; }
.carousel-dots button {
  position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent;
}
.carousel-dots button::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 3px;
  width: 18px; margin-left: -9px; margin-top: -3px;
  background: rgba(242, 238, 228, .35); transform: scaleX(.34); transition: transform .2s var(--ease), background-color .2s ease;
}
.carousel-dots button[aria-current="true"]::after { transform: none; background: var(--gold); }

/* accesos a categorías: en teléfono los reemplazan los chips del catálogo */
.tiles { display: none; }
.tile {
  position: relative; display: flex; align-items: flex-end; min-height: 92px; padding: 12px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--felt);
  font: 700 17px/1.1 var(--display);
}
.tile:hover { border-color: var(--line-2); background: var(--felt-2); }
.tile-art { position: absolute; right: 8px; top: 8px; width: 64px; height: 64px; fill: rgba(233, 185, 73, .1); stroke: var(--gold); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.tile span { position: relative; }

/* ---------- lobby ---------- */
.lobby { margin-top: 12px; }
.search-field {
  position: relative; display: flex; align-items: center;
  height: 46px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--felt);
}
.search-field:focus-within { border-color: var(--gold); }
.search-field > .ico { position: absolute; left: 14px; color: var(--dusk); pointer-events: none; }
.search-field input, .topbar-search input {
  width: 100%; height: 100%; min-width: 0; padding: 0 44px 0 44px;
  border: 0; border-radius: inherit; background: transparent;
  font-size: 16px; /* 16 px: iOS no hace zoom al enfocar */
  -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder, .topbar-search input::placeholder { color: var(--dusk); }
.search-field input::-webkit-search-cancel-button, .topbar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { position: absolute; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--mist); }
.search-clear .ico { width: 18px; height: 18px; }

.lobby-bar {
  position: sticky; top: var(--topbar-h); z-index: 30;
  margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) 8px;
  background: var(--night);
}
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.lobby-bar .chip-row { margin: 0 calc(-1 * var(--gutter)); }
.chip-row::-webkit-scrollbar { display: none; }
/* los chips los crea app.js: la fila reserva su alto para que la rejilla no salte al cargar (CLS) */
#lv-cats, #lv-providers { min-height: 44px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: 44px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--mist); background: var(--table);
  font-weight: 600; font-size: 14px; white-space: nowrap;
}
.chip .ico { width: 16px; height: 16px; }
.chip:hover { color: var(--ivory); border-color: var(--line-2); }
/* el oro marca la próxima acción; el filtro activo se distingue con borde, no con relleno dorado */
.chip[aria-pressed="true"] { color: var(--ivory); background: var(--felt-2); border-color: var(--gold); }
.chip-count { font-size: 12px; font-weight: 600; opacity: .75; }
.chip-row-providers { margin-top: 2px; margin-bottom: 2px; }
.chip-row-providers .chip { min-height: 44px; padding: 0 13px; font-size: 13.5px; background: transparent; }
.chip-row-providers .chip[aria-pressed="true"] { color: var(--ivory); background: var(--felt-2); border-color: var(--gold); }
.chip-label { display: inline-flex; align-items: center; flex: 0 0 auto; padding-right: 2px; color: var(--dusk); font-size: 12.5px; }

.lobby-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 12px 0 2px; }
.lobby-head h2 { font: 700 22px/1.1 var(--display); }
.lobby-count { color: var(--dusk); font-size: 13px; white-space: nowrap; }
.demo-note { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--mist); font-size: 12.5px; line-height: 1.3; }
.demo-note .ico { width: 16px; height: 16px; color: var(--gold-hi); }

/* ---------- filas horizontales de juegos: una fila por sección, deslizar con el dedo ---------- */
:root { --card-w: clamp(132px, 38vw, 164px); }
.rails { display: grid; gap: 22px; margin-top: 2px; }
.rail { min-width: 0; }
.rail-head { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 6px; }
.rail-title { font: 700 20px/1.1 var(--display); }
.rail-count { color: var(--dusk); font-size: 13px; font-variant-numeric: tabular-nums; }
.rail-nav { display: none; gap: 4px; margin-left: auto; }
.rail-arrow { width: 44px; height: 44px; flex-basis: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--table); }
.rail-arrow:disabled { opacity: .35; cursor: default; background: transparent; }
.rail.is-static .rail-nav { visibility: hidden; }
.rail-all { margin-left: auto; min-height: 44px; padding: 0 2px 0 10px; border: 0; background: transparent; color: var(--gold-hi); font-weight: 600; font-size: 14px; white-space: nowrap; }
.rail-all:hover { color: var(--ivory); }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w); gap: 12px;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > .game { scroll-snap-align: start; }
.rail-sk-title { width: 140px; height: 20px; }
.rail.is-loading .rail-track { overflow: hidden; }
.lobby.is-home .lobby-head { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lobby.is-home .demo-note { margin-top: 10px; }

/* ---------- tarjetas de juego ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.game { position: relative; min-width: 0; }
.game-card {
  display: grid; gap: 0; width: 100%; padding: 0; text-align: left;
  border: 0; border-radius: var(--r-card); background: transparent;
}
.game-cover {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--r-card); background: var(--felt);
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-card:focus-visible { outline: none; }
.game-card:focus-visible .game-cover { outline: var(--focus-ring); outline-offset: 2px; }
@media (hover: hover) {
  .game-card .game-cover img { transition: transform .25s var(--ease); }
  .game-card:hover .game-cover img { transform: scale(1.03); }
}
.game-badge {
  position: absolute; left: 8px; top: 8px;
  padding: 3px 8px; border-radius: 6px;
  color: var(--ivory); background: rgba(8, 16, 28, .82);
  font-size: 12px; font-weight: 600; line-height: 1.3;
}
.game-badge.is-soon { color: var(--gold-ink); background: var(--gold-hi); }
.game-tag { position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; color: var(--gold-ink); background: var(--gold); font-size: 12px; font-weight: 700; }
.game-name { display: block; margin-top: 8px; overflow: hidden; font: 600 16px/1.2 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.game-provider { display: block; margin-top: 1px; overflow: hidden; color: var(--dusk); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.game-fav {
  position: absolute; right: 2px; top: 2px; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: transparent; color: var(--ivory);
}
.game-fav::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(8, 16, 28, .72); }
.game-fav .ico { position: relative; width: 18px; height: 18px; }
.game-fav[aria-pressed="true"] { color: var(--gold); }
.game-fav[aria-pressed="true"] .ico { fill: currentColor; }

/* carga: esqueleto con la misma forma que la tarjeta (portada 3:4 + nombre + proveedor), sin saltos de layout */
.game.is-skeleton::before { content: ""; display: block; aspect-ratio: 3 / 4; border-radius: var(--r-card); background: var(--felt); }
.game.is-skeleton::after { content: ""; display: block; width: 70%; height: 16px; margin: 10px 0 21px; border-radius: 6px; background: var(--felt); }
@media (prefers-reduced-motion: no-preference) {
  .game.is-skeleton { animation: cf-pulse 1.2s ease-in-out infinite alternate; }
  @keyframes cf-pulse { from { opacity: .55; } to { opacity: 1; } }
}

.empty { display: grid; justify-items: center; gap: 6px; padding: 28px 12px 12px; text-align: center; }
.empty-art { width: 76px; height: 76px; fill: rgba(233, 185, 73, .08); stroke: var(--gold); stroke-width: 6; stroke-linejoin: round; opacity: .7; }
.empty-title { font: 700 19px/1.2 var(--display); }
.empty-text { max-width: 34ch; color: var(--mist); font-size: 14px; }
.empty .btn { margin-top: 8px; }
.lobby-more { display: grid; justify-items: center; padding: 18px 0 6px; }
.lobby-sentinel { display: block; width: 1px; height: 1px; }

/* ---------- bandas informativas ---------- */
.section { margin-top: 28px; }
.info-band { padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--table); }
.info-band h2 { font: 700 20px/1.15 var(--display); }
.info-band > p { margin-top: 4px; color: var(--mist); font-size: 14px; }
.logo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.logo-row li { display: grid; place-items: center; height: 56px; padding: 8px 14px; border-radius: var(--r-ctl); background: var(--ivory); }
/* proveedores: una sola fila de tarjetas claras con cada logo en sus colores originales (los seis logos tienen texto
   oscuro). En teléfono se desliza de costado; en pantallas anchas entran las seis. */
#proveedores .logo-row {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(148px, 1fr); gap: 10px;
  margin: 14px -16px 0; padding: 0 16px 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none;
}
#proveedores .logo-row::-webkit-scrollbar { display: none; }
#proveedores .logo-row li { height: 84px; padding: 12px 18px; border-radius: var(--r-ctl); background: #f2eee4; scroll-snap-align: start; }
.logo-row img { max-height: 32px; width: auto; object-fit: contain; }
#proveedores .logo-row img { max-height: 46px; }

.support-actions { display: grid; gap: 8px; margin-top: 14px; }
.support-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--felt); }
.support-link:hover { border-color: var(--line-2); background: var(--felt-2); }
.support-link img { width: 26px; height: 26px; }
.support-link strong { display: block; font-size: 15px; }
.support-link small { display: block; color: var(--dusk); font-size: 12.5px; }
.site-footer { display: grid; gap: 4px; margin: 28px var(--gutter) 0; padding: 18px 0 8px; border-top: 1px solid var(--line); color: var(--dusk); font-size: 12px; }


/* =========================================================
   CAJERO · la promesa del producto, a un toque desde el inicio
   ========================================================= */
.cashier {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 10px 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--table);
}
.cashier-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--gold); background: var(--gold-wash); }
.cashier-copy { display: grid; min-width: 0; line-height: 1.25; }
.cashier-copy strong { font: 700 17px/1.15 var(--display); }
.cashier-copy span { color: var(--mist); font-size: 13px; }
.cashier-cta { min-height: 44px; color: var(--ivory); background: var(--felt); border-color: var(--line-2); }
.cashier-cta:hover { background: var(--felt-2); }
body.is-auth .cashier-cta { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
body.is-auth .cashier-cta:hover { background: var(--gold-hi); }
@media (max-width: 374px) { .cashier-copy span { display: none; } .cashier { gap: 10px; } }
.support-cta { margin-top: 14px; }

.cashier-sheet { display: grid; gap: 12px; padding: 20px var(--gutter) calc(20px + var(--safe-b)); }
.cashier-sheet h2 { padding-right: 44px; font: 700 26px/1.05 var(--display); }
.cashier-sheet p { color: var(--mist); font-size: 15px; }
.cashier-sheet-actions { display: grid; gap: 8px; margin-top: 4px; }
.cashier-sheet .support-actions { margin-top: 4px; }

/* teléfonos bajos (SE y similares): banner en una fila, franja compacta, proveedores plegados y barra no fija,
   para que la franja del cajero y la primera fila de juegos compartan el primer pantallazo */
@media (max-width: 599px) and (max-height: 640px) {
  .slide { min-height: 0; padding: 10px 12px 10px 14px; }
  .slide-text, .slide-cta-meta { display: none; }
  .slide-copy { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
  .slide-title { font-size: 17px; }
  .slide-cta { margin: 0; }
  .carousel-controls { display: none; }
  .slide-badge { top: 4px; right: 6px; font-size: 12px; }
  .cashier { margin-top: 8px; padding: 6px 6px 6px 10px; gap: 8px; }
  .cashier-mark { display: none; }
  .cashier-copy span { display: none; }
  .demo-note { display: none; }   /* cada tarjeta ya lleva su badge "Demo" */
}
/* proveedores: en teléfonos bajos se pliegan detrás de un chip y la barra deja de ser fija */
.prov-toggle { display: none; }
@media (max-width: 599px) and (max-height: 700px) {
  .lobby-bar { position: static; }
  .prov-toggle { display: inline-flex; margin-top: 2px; }
  .prov-toggle span { color: var(--ivory); }
  .lobby:not(.providers-open) #lv-providers { display: none; }
  #lv-providers { margin-top: 8px; }
}

/* =========================================================
   TABBAR (teléfono y tablet)
   ========================================================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 max(4px, env(safe-area-inset-right, 0px)) var(--safe-b) max(4px, env(safe-area-inset-left, 0px));
  background: var(--table);
  border-top: 1px solid var(--line);
}
.tabbar button {
  display: grid; justify-items: center; align-content: center; gap: 3px;
  min-width: 0; padding: 0; border: 0; background: transparent;
  color: var(--dusk); font-size: 12px; font-weight: 600;
}
.tabbar button .ico { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--gold); }
.tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.drawer-open .tabbar { visibility: hidden; }

/* =========================================================
   SHEET (ficha del juego) · hoja inferior en móvil, diálogo en escritorio
   ========================================================= */
.sheet { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(3, 6, 12, .66); }
.sheet-card {
  position: relative; width: 100%; max-height: min(92dvh, calc(var(--vvh, 100dvh) - 12px)); overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--table); border-top: 1px solid var(--line-2);
  padding-bottom: calc(16px + var(--safe-b));
}
.sheet-card:focus { outline: none; }
.sheet-close { position: absolute; right: 8px; top: 8px; z-index: 2; background: rgba(8, 16, 28, .72); }
body.sheet-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .sheet:not([hidden]) .sheet-card { animation: cf-rise .22s var(--ease); }
  .sheet:not([hidden]) .sheet-scrim { animation: cf-fade .18s ease; }
  @keyframes cf-rise { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
  @keyframes cf-fade { from { opacity: 0; } to { opacity: 1; } }
}
.game-sheet { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 16px var(--gutter); }
.game-sheet-cover { width: 112px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-ctl); background: var(--felt); }
.game-sheet-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-sheet-body { display: grid; align-content: start; gap: 8px; min-width: 0; padding-right: 36px; }
.game-sheet-badge { justify-self: start; padding: 2px 8px; border: 1px dashed rgba(244, 207, 110, .6); border-radius: 999px; color: var(--gold-hi); font-size: 12px; font-weight: 600; }
.game-sheet-body h2 { font: 700 24px/1.05 var(--display); overflow-wrap: anywhere; }
.game-sheet-meta { display: grid; gap: 2px; margin: 0; font-size: 13.5px; }
.game-sheet-meta div { display: flex; gap: 6px; }
.game-sheet-meta dt { color: var(--dusk); }
.game-sheet-meta dd { margin: 0; color: var(--ivory); }
.game-sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.game-sheet-tags li { padding: 2px 8px; border-radius: 6px; background: var(--felt); color: var(--mist); font-size: 12px; font-weight: 600; }
.game-sheet-note { grid-column: 1 / -1; color: var(--mist); font-size: 13.5px; }
.game-sheet-actions { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 4px; }
#lv-game-fav[aria-pressed="true"] { color: var(--gold); border-color: rgba(233, 185, 73, .5); }
#lv-game-fav[aria-pressed="true"] .ico { fill: currentColor; }

/* =========================================================
   CUENTA (perfil · billetera · historial)
   ========================================================= */
.account { display: grid; gap: 14px; }
.acc-head { display: flex; align-items: center; gap: 12px; }
.acc-avatar { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; color: var(--gold-hi); background: var(--felt); border: 1px solid var(--line-2); }
.acc-avatar .ico { width: 26px; height: 26px; }
.acc-head h1 { font: 700 24px/1.1 var(--display); }
.acc-head p { color: var(--mist); font-size: 13.5px; overflow-wrap: anywhere; }
.acc-head .acc-online { color: var(--in); }
.seg {
  position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--table);
}
.seg button { min-height: 40px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--mist); font-weight: 600; font-size: 14px; }
.seg button[aria-selected="true"] { color: var(--gold-ink); background: var(--gold); }
.acc-grid { display: grid; gap: 14px; }
.panel { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--table); }
.panel[hidden] { display: none !important; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font: 700 19px/1.1 var(--display); }
.panel-title .ico { color: var(--gold-hi); }
.bal-label { color: var(--mist); font-size: 13px; }
.bal-total { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 14px; font: 700 40px/1 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bal-total small { font: 600 15px/1 var(--ui); color: var(--mist); }
.bal-split { display: grid; gap: 8px; }
.bal-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: var(--r-ctl); background: var(--felt); }
.bal-item span { display: grid; gap: 1px; font-size: 14px; }
.bal-item small { color: var(--dusk); font-size: 12px; }
.bal-item strong { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bal-item.is-promo { border: 1px dashed rgba(233, 185, 73, .45); background: transparent; }
.bal-item.is-promo strong { color: var(--gold-hi); }
.acc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.acc-status { margin-top: 12px; color: var(--dusk); font-size: 12.5px; }
.acc-status.is-error { color: var(--warn); }
.sk { display: block; height: 14px; border-radius: 6px; background: var(--felt); }
.sk + .sk { margin-top: 10px; }
.sk-lg { height: 40px; width: 60%; }
.hist-filters { display: flex; gap: 6px; margin: 0 -16px 10px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.hist-filters::-webkit-scrollbar { display: none; }
.hist-filters .chip { min-height: 44px; font-size: 13.5px; }
.hist-list { display: grid; }
.hist-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.hist-item:first-child { border-top: 0; }
.hist-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--felt); color: var(--mist); font-weight: 700; }
.hist-item.is-in .hist-ico { color: var(--in); }
.hist-type { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hist-date { grid-column: 2; color: var(--dusk); font-size: 12px; }
.hist-amount { grid-column: 3; grid-row: 1 / span 2; font: 700 17px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hist-item.is-in .hist-amount { color: var(--in); }
.hist-promo { color: var(--gold-hi); font-size: 12px; font-weight: 600; }
.hist-more { margin-top: 12px; }
.prof-list { display: grid; }
.prof-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line); }
.prof-row:first-child { border-top: 0; }
.prof-row dt, .prof-row .prof-k { color: var(--dusk); font-size: 13px; }
.prof-row dd, .prof-row .prof-v { margin: 0; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.prof-actions { display: grid; gap: 8px; margin-top: 12px; }
.prof-sub { margin: 16px 0 6px; font: 700 16px/1.1 var(--display); color: var(--mist); }
.link-btn { min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--mist); font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ivory); }
.acc-gate { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center; }
.acc-gate .btn { width: min(100%, 320px); }

/* =========================================================
   MODAL DE ACCESO (#cf-modal · script.js) — hoja inferior en móvil
   ========================================================= */
.cf-modal { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: flex-end; justify-content: center; background: rgba(3, 6, 12, .7); }
.cf-modal-card {
  position: relative; width: 100%;
  max-height: min(94dvh, calc(var(--vvh, 100dvh) - 8px));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 14px var(--gutter) calc(18px + var(--safe-b));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--table); border-top: 1px solid var(--line-2);
}
@media (prefers-reduced-motion: no-preference) {
  .cf-modal:not([hidden]) .cf-modal-card { animation: cf-rise .22s var(--ease); }
}
.cf-modal-top { display: flex; align-items: center; justify-content: space-between; }
.cf-modal-emblem img { width: 40px; height: 40px; border-radius: 50%; }
/* pantallas bajas: sin escudo, el cerrar va junto al título y el formulario gana una fila */
@media (max-height: 640px) {
  .cf-modal-emblem { display: none; }
  .cf-modal-top { position: absolute; top: 8px; right: calc(var(--gutter) - 4px); }
  .cf-modal-card h2 { margin-top: 2px; padding-right: 48px; }
}
.cf-modal-close { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -6px; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--mist); }
.cf-modal-close:hover { color: var(--ivory); background: var(--felt); }
.cf-modal-card h2 { margin: 8px 0 12px; font: 700 28px/1.05 var(--display); }
.cf-auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--night); }
.cf-auth-switch button { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--mist); font-weight: 600; }
.cf-auth-switch button[aria-pressed="true"] { color: var(--ivory); background: var(--felt-2); box-shadow: inset 0 -2px 0 var(--gold); }
.cf-modal-text { color: var(--mist); font-size: 14px; }
.cf-modal-card label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: var(--ivory); }
.cf-modal-card input {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  background: var(--night); font-size: 16px;
}
.cf-modal-card input::placeholder { color: var(--dusk); }
.cf-modal-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(233, 185, 73, .2); }
.cf-modal-card input.is-invalid { border-color: var(--warn); }
.cf-modal-card input.is-valid { border-color: var(--in); }
.cf-password-field { position: relative; }
.cf-password-field input { padding-right: 92px; }
.cf-password-toggle {
  position: absolute; right: 3px; top: 3px; height: 44px; min-width: 80px; padding: 0 12px;
  border: 0; border-radius: 8px; background: transparent; color: var(--gold-hi); font-weight: 600; font-size: 14px;
}
.cf-password-toggle:hover { background: var(--felt); }
.cf-field-note { margin-top: 6px; color: var(--dusk); font-size: 12.5px; }
.cf-field-hint { min-height: 1.4em; margin-top: 6px; color: var(--dusk); font-size: 13px; }
.cf-field-hint.is-valid { color: var(--in); }
.cf-field-hint.is-invalid { color: var(--warn); }
.cf-modal-error { min-height: 1.4em; margin-top: 6px; color: var(--warn); font-size: 13.5px; }
/* #cf-account-status comparte la clase de error de script.js: sin .is-error es una confirmación */
#cf-account-status:not(.is-error) { color: var(--in); }
.cf-modal-error:empty { min-height: 0; margin: 0; }
.cf-modal-card form .btn { margin-top: 12px; }
.cf-modal-legal { margin-top: 10px; color: var(--dusk); font-size: 12.5px; }
.cf-account-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cf-account-avatar { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; overflow: hidden; border-radius: 50%; background: var(--felt); border: 1px solid var(--line-2); }
.cf-account-avatar img { width: 26px; height: 26px; }
.cf-account-avatar .cf-avatar-image { width: 100%; height: 100%; object-fit: cover; }
.cf-account-summary strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.cf-account-badge { display: block; color: var(--in); font-size: 12.5px; }
.cf-ticket { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--night); border: 1px solid var(--line); }
.cf-ticket span { color: var(--dusk); font-size: 13px; }
.cf-ticket strong { flex: 1; overflow-wrap: anywhere; color: var(--gold-hi); font-size: 16px; text-align: right; }
.cf-ticket-copy { display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--mist); }
.cf-ticket-copy:hover { color: var(--ivory); background: var(--felt); }
.cf-account-next { margin-top: 14px; font: 600 17px/1.3 var(--display); color: var(--ivory); }
/* una sola puerta a la cuenta: el acceso duplicado que agrega wallet.js no se muestra en este panel */
#cf-account-panel .cf-account-wallet-open { display: none; }
.cf-account-buttons { display: grid; gap: 8px; margin-top: 12px; }
.cf-account-note { margin-top: 12px; font-size: 12.5px; color: var(--dusk); }
.cf-account-logout { width: 100%; min-height: 48px; margin-top: 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--mist); font-weight: 600; }
.cf-account-logout:hover { color: var(--ivory); }
body.cf-account-open { overflow: hidden; }
/* restos V1 que script.js sigue manejando (siempre ocultos en V2) */
.cf-welcome-widget, .cf-auth-launcher { display: none !important; }

/* =========================================================
   MODAL DE VIDEO (video-modal.js) — portado de V1 sin degradados ni blur
   ========================================================= */
body.cf-video-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; padding-right: var(--cf-sbw, 0px); }
body.cf-video-open #cf-widget-root { opacity: 0; visibility: hidden; pointer-events: none; }
:root { --cf-vm-gutter: 14px; --cf-vm-chrome: 196px; }
.cf-video-modal { position: fixed; inset: 0; z-index: 1250; }
.cf-video-scrim { position: absolute; inset: 0; background: rgba(4, 8, 15, .97); }
.cf-video-dialog {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + var(--cf-vm-gutter)) calc(var(--safe-b) + 10px) calc(env(safe-area-inset-left, 0px) + var(--cf-vm-gutter));
}
.cf-video-close { align-self: flex-end; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); color: var(--ivory); background: var(--table); }
.cf-video-close svg { width: 20px; height: 20px; }
.cf-video-stage { position: relative; flex: 0 1 auto; min-height: 0; }
.cf-video-frame {
  position: relative; margin: 0;
  width: min(calc(100vw - 2 * var(--cf-vm-gutter) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), calc((100dvh - var(--cf-vm-chrome) - env(safe-area-inset-top, 0px) - var(--safe-b)) * 9 / 16), 420px);
  aspect-ratio: 9 / 16; overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px; background: #03060b;
}
.cf-video-el { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; background: #03060b; }
.cf-video-modal.is-ended .cf-video-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: rgba(3, 7, 14, .62); }
.cf-video-replay { position: absolute; top: 50%; left: 50%; z-index: 3; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px; border: 1px solid rgba(244, 207, 110, .45); border-radius: 999px; color: var(--ivory); background: var(--table); font-weight: 600; }
.cf-video-replay svg { width: 18px; height: 18px; stroke: var(--gold-hi); }
.cf-video-error { max-width: 34ch; margin: 12px 0 0; color: var(--warn); font-size: 13px; text-align: center; }
.cf-video-actions { display: grid; justify-items: center; gap: 6px; width: 100%; max-width: 420px; padding-top: 14px; }
.cf-video-cta { width: 100%; }
.cf-video-alt { min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--mist); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
body.is-auth .cf-video-alt { display: none; }
@media (max-height: 640px) { :root { --cf-vm-chrome: 150px; } .cf-video-alt { display: none; } }
@media (orientation: landscape) and (max-height: 560px) {
  :root { --cf-vm-chrome: 92px; }
  .cf-video-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); right: calc(env(safe-area-inset-right, 0px) + 8px); margin: 0; }
}

/* =========================================================
   ≥ 600 px · teléfonos grandes en horizontal / tablet chica
   ========================================================= */
@media (min-width: 600px) {
  :root { --gutter: 20px; }
  .brand-name { max-width: none; font-size: 19px; line-height: 1; white-space: nowrap; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; }
  .slide { min-height: 180px; padding: 20px 24px 34px; }
  .slide-title { font-size: 26px; }
  .logo-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .support-actions { grid-template-columns: 1fr 1fr; }
  .account-btn .cf-account-label { display: block; }
  /* hoja → diálogo centrado */
  .sheet, .cf-modal { align-items: center; padding: 24px; }
  .sheet-card, .cf-modal-card { width: min(100%, 460px); border-radius: var(--r-sheet); border: 1px solid var(--line-2); box-shadow: var(--shadow); padding-bottom: 20px; }
  .cf-modal-card { padding: 18px 24px 22px; max-height: min(92dvh, calc(var(--vvh, 100dvh) - 32px)); }
  .game-sheet { width: min(100%, 560px); grid-template-columns: 168px minmax(0, 1fr); padding: 20px; }
  .game-sheet-cover { width: 168px; }
}



/* =========================================================
   ≥ 768 px · tablet
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 24px; --topbar-h: 64px; }
  .view { padding-top: 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  :root { --card-w: 160px; }
  .rail-nav { display: flex; }
  .rail-nav + .rail-all { margin-left: 4px; }
  .rail-track { gap: 16px; }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
  .carousel-prev, .carousel-next { display: inline-grid; pointer-events: auto; width: 44px; height: 44px; flex-basis: 44px; background: rgba(8, 16, 28, .7); }
  .carousel-controls { justify-content: flex-end; gap: 4px; padding-right: 10px; bottom: 8px; }
  .carousel-dots { margin-right: 4px; }
  .lobby-head h2 { font-size: 26px; }
  .acc-actions { grid-template-columns: repeat(2, max-content); }
}

/* =========================================================
   ≥ 1100 px · escritorio: sidebar fija, buscador en el header, sin tabbar
   ========================================================= */
@media (min-width: 1100px) {
  :root { --gutter: 32px; --side-w: 240px; }
  body.nav-collapsed { --side-w: 76px; }
  .topbar { gap: 12px; padding: 0 24px 0 14px; }
  .topbar-menu { display: none; }
  .brand { width: calc(var(--side-w) - 22px); }
  body.nav-collapsed .brand-name { display: none; }
  .topbar-search {
    position: relative; display: flex; align-items: center; flex: 0 1 440px; height: 46px;
    border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--felt);
  }
  .topbar-search:focus-within { border-color: var(--gold); }
  .topbar-search > .ico { position: absolute; left: 14px; color: var(--dusk); pointer-events: none; }
  .topbar-search input { padding-right: 14px; font-size: 15px; }
  .header-actions .btn-sm { min-height: 44px; padding: 0 18px; }
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .drawer-scrim { display: none !important; }
  .sidenav {
    position: sticky; top: var(--topbar-h); z-index: 1;
    height: calc(100dvh - var(--topbar-h)); width: auto;
    padding: 12px 12px 14px;
    transform: none; visibility: visible; transition: none; box-shadow: none !important;
  }
  .sidenav-head { display: none; }
  .site-nav:first-of-type { border-top: 0; }
  .sidenav-collapse {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; margin-top: 8px;
    border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--dusk); font-size: 13.5px; font-weight: 600;
  }
  .sidenav-collapse:hover { color: var(--ivory); background: var(--felt); }
  body.nav-collapsed .sidenav { padding-left: 10px; padding-right: 10px; }
  body.nav-collapsed .site-nav a, body.nav-collapsed .nav-soon { justify-content: center; padding: 0; font-size: 0; gap: 0; }
  body.nav-collapsed .nav-soon small, body.nav-collapsed .sidenav-support, body.nav-collapsed .sidenav-collapse span { display: none; }
  body.nav-collapsed .sidenav-collapse { justify-content: center; padding: 0; }
  body.nav-collapsed .sidenav-collapse .ico { transform: scaleX(-1); }
  main { padding-bottom: 96px; }
  .cashier { margin-top: 16px; }
  .cashier-sheet { width: min(100%, 460px); }
  .view { padding: 20px var(--gutter) 0; }
  .tabbar { display: none; }
  .search-field { display: none; }
  .lobby-bar { top: var(--topbar-h); padding-top: 12px; }
  .hero { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; gap: 16px; }
  .slide { min-height: 248px; padding: 28px 32px 40px; }
  .slide-title { font-size: 34px; }
  .slide-text { font-size: 15px; }
  .slide-copy { max-width: 60%; gap: 8px; }
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .tile { min-height: 0; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 14px; }
  :root { --card-w: 172px; }
  .rails { gap: 28px; }
  .tile-art { width: 84px; height: 84px; right: 12px; top: 10px; }
  .section-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .site-footer { margin: 32px var(--gutter) 0; grid-auto-flow: column; justify-content: space-between; }
  .seg { display: none; }
  .acc-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.2fr); align-items: start; }
  .acc-grid .panel[hidden] { display: block !important; }
}

/* landscape en teléfono: banner fino, sin accesos duplicados y sin barras fijas que se coman la pantalla */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topbar-h: 56px; }
  .lobby-bar { position: static; }
  .tiles, .slide-text, .demo-note, .cashier { display: none; }
  .slide { min-height: 0; padding: 12px 20px; }
  .slide-copy { max-width: none; grid-auto-flow: column; align-items: center; gap: 16px; }
  .slide-cta { margin: 0; }
  .carousel-controls { top: 0; }
  .game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* buscador y categorías en una sola fila */
  .lobby { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .lobby > :not(.search-field):not(.lobby-bar) { grid-column: 1 / -1; }
  .lobby-bar { margin: 0 calc(-1 * var(--gutter)) 0 0; padding: 8px var(--gutter) 8px 0; }
  .lobby-bar .chip-row { margin: 0 calc(-1 * var(--gutter)) 0 0; padding-left: 0; }
  /* proveedores plegados detrás del chip "Proveedor", como en los teléfonos bajos */
  .prov-toggle { display: inline-flex; margin-top: 2px; }
  .prov-toggle span { color: var(--ivory); }
  .lobby:not(.providers-open) #lv-providers { display: none; }
  /* barra inferior compacta: ícono y texto en línea */
  :root { --tabbar-h: 48px; }
  .tabbar button { grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

#cf-register-validation:not([hidden]) { min-height: 1.4em; margin: 8px 0 0; color: #ff9292; font-size: 12px; line-height: 1.45; }
#cf-nombre-error:empty, #cf-password-length:empty, #cf-password-match:empty { display: none; }

@media (max-width: 600px) {
  #cf-register-validation:not([hidden]), #cf-nombre-error, #cf-password-length, #cf-password-match { font-size: 13px; line-height: 1.45; }
}
