/* Consola SimiJuegos. Layout: barra lateral fija con las secciones; arriba el letrero de la sección (con el
   Dr. Simi) y una sola fila de filtros que manda sobre todo lo de abajo; cada sección abre con sus números grandes
   y debajo el detalle. Colores de la marca SimiJuegos (plataforma/src/app/globals.css): violeta, rosa, cian y
   dorado, con el morado profundo de la app. Los de las gráficas están validados para daltonismo y contraste. */
:root {
  --bg: #f3effb;
  --surface: #ffffff;
  --surface-2: #f7f3fe;
  --ink: #1e1036;
  --ink-2: #4b4066;
  --muted: #776d90;
  --line: #ebe4f7;
  --line-strong: #d9cdef;
  --brand: #7c3aed;
  --brand-ink: #5b21b6;
  --brand-soft: #efe6fe;
  --rosa: #db2777;
  --cian: #0891b2;
  --gold: #f5b311;
  --gold-ink: #8a5a00;
  --gold-soft: #fff4d4;
  --s1: #7c3aed;
  --s2: #e5600e;
  --s3: #0e9fb5;
  --good: #16a34a;
  --good-ink: #08702f;
  --warn: #fab219;
  --warn-ink: #8a5a00;
  --warn-soft: #fff4d6;
  --crit: #d03b3b;
  --crit-ink: #a52626;
  --crit-soft: #fdebeb;
  --h0: #f6f2ff; --h1: #e6dafe; --h2: #cdb6fb; --h3: #ad8bf6; --h4: #8450ec; --h5: #6d35d6; --h6: #4c1fa0;
  --o1: #b392f7; --o2: #9466f0; --o3: #7c3aed; --o4: #6025cc; --o5: #45198f;
  --tinta-sobre-fuerte: #1e1036;
  --h-tinta-alta: #ffffff;
  --shadow: 0 1px 2px rgba(30, 16, 54, .05), 0 10px 26px -14px rgba(76, 29, 149, .28);
  --marca-fondo: radial-gradient(90% 140% at 0% 0%, rgba(34, 211, 238, .38), transparent 46%), radial-gradient(70% 120% at 100% 100%, rgba(244, 114, 182, .55), transparent 55%), linear-gradient(115deg, #3b1290 0%, #6d28d9 45%, #a21caf 100%);
  --lado-fondo: radial-gradient(120% 50% at 0% 0%, rgba(34, 211, 238, .2), transparent 60%), radial-gradient(100% 40% at 100% 100%, rgba(217, 70, 239, .22), transparent 60%), linear-gradient(180deg, #2a1272 0%, #1e1036 72%);
  --boton-fondo: linear-gradient(135deg, #7c3aed 0%, #a21caf 100%);
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0a1f; --surface: #181331; --surface-2: #221b42; --ink: #f7f4ff; --ink-2: #cfc6ea; --muted: #9a90b8;
    --line: #2c2450; --line-strong: #3d3468; --brand: #a27bf5; --brand-ink: #c9b3ff; --brand-soft: #2a1f55;
    --rosa: #f472b6; --cian: #22d3ee; --gold: #ffc83d; --gold-ink: #ffd36b; --gold-soft: #3a2c10;
    --s1: #9466f0; --s2: #e66d22; --s3: #14a3b9;
    --good: #22c55e; --good-ink: #4ade80; --warn: #fab219; --warn-ink: #ffcf66; --warn-soft: #3a2e12;
    --crit: #e05555; --crit-ink: #ff8f8f; --crit-soft: #3b1d22;
    --h0: #1d1640; --h1: #2e2259; --h2: #42308a; --h3: #5b41bf; --h4: #7b5ee6; --h5: #a48cf3; --h6: #d2c5fa;
    --o1: #5b36c4; --o2: #7650e6; --o3: #9473f0; --o4: #b39cf5; --o5: #d4c6fa;
    --tinta-sobre-fuerte: #ffffff; --h-tinta-alta: #0e0a1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0a1f; --surface: #181331; --surface-2: #221b42; --ink: #f7f4ff; --ink-2: #cfc6ea; --muted: #9a90b8;
  --line: #2c2450; --line-strong: #3d3468; --brand: #a27bf5; --brand-ink: #c9b3ff; --brand-soft: #2a1f55;
  --rosa: #f472b6; --cian: #22d3ee; --gold: #ffc83d; --gold-ink: #ffd36b; --gold-soft: #3a2c10;
  --s1: #9466f0; --s2: #e66d22; --s3: #14a3b9;
  --good: #22c55e; --good-ink: #4ade80; --warn: #fab219; --warn-ink: #ffcf66; --warn-soft: #3a2e12;
  --crit: #e05555; --crit-ink: #ff8f8f; --crit-soft: #3b1d22;
  --h0: #1d1640; --h1: #2e2259; --h2: #42308a; --h3: #5b41bf; --h4: #7b5ee6; --h5: #a48cf3; --h6: #d2c5fa;
  --o1: #5b36c4; --o2: #7650e6; --o3: #9473f0; --o4: #b39cf5; --o5: #d4c6fa;
  --tinta-sobre-fuerte: #ffffff; --h-tinta-alta: #0e0a1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--font-ui); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 901px) { .app { background: linear-gradient(90deg, #1e1036 0 248px, transparent 248px); } }

/* ---------- barra lateral ---------- */
/* La barra lateral es siempre morada (como la app), en tema claro y oscuro */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: calc(20px + env(safe-area-inset-top, 0px)) 14px 16px calc(14px + env(safe-area-inset-left, 0px)); background: var(--lado-fondo); color: #fff; overflow-y: auto; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.marca { display: flex; align-items: center; gap: 11px; padding: 0 4px; flex: none; }
.marca__logo { width: 50px; height: 50px; flex: none; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
.marca__nombre { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.015em; line-height: 1; white-space: nowrap; color: #fff; }
.marca__nombre b { color: #ffc83d; font-weight: 800; }
.marca__sub { font-size: 9.5px; color: rgba(255, 255, 255, .72); letter-spacing: .05em; text-transform: uppercase; margin-top: 5px; font-weight: 700; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav__grupo { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); padding: 12px 10px 5px; font-weight: 700; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: none; padding: 9px 11px; border-radius: 12px; color: rgba(255, 255, 255, .86); font-weight: 600; text-align: left; transition: background .15s, color .15s; }
.nav button svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav button[aria-current="page"] { background: #fff; color: #4c1d95; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45); }
.nav button[aria-current="page"] svg { color: #7c3aed; }
.nav button:focus-visible { outline-color: #ffc83d; }
.nav__cuenta { margin-left: auto; font-size: 11.5px; font-weight: 800; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: #ffc83d; color: #1e1036; }
.fuentes { margin-top: auto; padding: 13px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }
.fuentes h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #fff; }
.fuente { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .85); padding: 3px 0; }
.fuente__estado { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.punto { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); flex: none; }
.punto--ok { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .2); }
.punto--pendiente { background: rgba(255, 255, 255, .35); }
.punto--error { background: var(--crit); }
.punto--demo { background: var(--gold); }

/* ---------- área principal ---------- */
.main { min-width: 0; padding: calc(20px + env(safe-area-inset-top, 0px)) calc(28px + env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) 28px; display: flex; flex-direction: column; gap: 18px; }
/* Letrero de cada sección: los colores del ícono de la app y el Dr. Simi asomándose */
.tope { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 22px 196px 22px 26px; min-height: 112px; border-radius: 22px; background: var(--marca-fondo); color: #fff; box-shadow: 0 18px 40px -22px rgba(91, 33, 182, .75); overflow: hidden; }
.tope::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(circle, rgba(255, 255, 255, .9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(255, 255, 255, .6) 0 1px, transparent 2px); background-size: 46px 46px, 29px 29px; background-position: 8px 12px, 21px 3px; -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 45%, #000 90%); mask-image: linear-gradient(90deg, transparent 0%, transparent 45%, #000 90%); }
.tope h1 { margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; text-shadow: 0 2px 10px rgba(30, 16, 54, .25); }
.tope__sub { margin-top: 6px; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 500; max-width: 60ch; }
.tope__simi { position: absolute; right: 22px; bottom: -30px; height: 140px; width: auto; z-index: -1; filter: drop-shadow(0 10px 18px rgba(30, 16, 54, .45)); pointer-events: none; transform-origin: bottom center; }
@media (prefers-reduced-motion: no-preference) { .tope__simi { animation: simiAsoma .5s cubic-bezier(.2, .9, .3, 1.3); } @keyframes simiAsoma { from { transform: translateY(40px) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } } }
.quien { display: flex; align-items: center; gap: 8px; }
.quien__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #5b21b6; font-weight: 800; font-size: 13px; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.quien__nombre { font-weight: 700; font-size: 13px; line-height: 1.2; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quien__rol { font-size: 11.5px; color: rgba(255, 255, 255, .78); }
.icono-boton { width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icono-boton:hover { color: var(--ink); background: var(--surface-2); }
.icono-boton svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tope .icono-boton { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(6px); }
.tope .icono-boton:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.tope :focus-visible { outline-color: #ffc83d; }

.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; box-shadow: var(--shadow); }
.filtro { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filtro__titulo { font-size: 12px; color: var(--muted); font-weight: 700; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-height: 32px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--boton-fondo); color: #fff; font-weight: 700; box-shadow: 0 6px 14px -8px rgba(124, 58, 237, .9); }
.seg button:disabled { opacity: .45; }
.filtros__fecha { margin-left: auto; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.filtros__fecha small { display: block; color: var(--muted); font-size: 11.5px; }

.ejemplo { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); font-size: 13px; }
.ejemplo strong { font-weight: 700; }
.ejemplo svg { flex: none; width: 18px; height: 18px; margin-top: 1px; stroke: var(--gold-ink); fill: none; stroke-width: 2; }

/* ---------- tarjetas ---------- */
.grid { display: grid; gap: 16px; }
.g-resumen { grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card--sombra { box-shadow: var(--shadow); }
.card__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card h2 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card__nota { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.ver-tabla { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; color: var(--brand-ink); white-space: nowrap; min-height: 30px; }
.ver-tabla:hover { background: var(--brand-soft); }

/* héroe: la cifra principal, en el morado de la marca */
.heroe { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(80% 70% at 100% 0%, rgba(244, 114, 182, .45), transparent 60%), linear-gradient(150deg, #4c1d95 0%, #7c3aed 55%, #9333ea 100%); color: #fff; border-color: transparent; box-shadow: 0 20px 40px -22px rgba(91, 33, 182, .8); }
.heroe::after { content: ""; position: absolute; z-index: -1; top: 14px; right: 16px; width: 74px; height: 74px; background: url(img/marca/icono-estrella.webp) center / contain no-repeat; transform: rotate(12deg); filter: drop-shadow(0 8px 14px rgba(30, 16, 54, .4)); }
.heroe__etiqueta { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .88); padding-right: 84px; }
.heroe__cifra { font-family: var(--font-display); font-size: 64px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; text-shadow: 0 4px 18px rgba(30, 16, 54, .3); }
.heroe__texto { color: rgba(255, 255, 255, .9); font-size: 14px; max-width: 46ch; text-wrap: pretty; margin: 0; }
.heroe__texto strong { color: #fff; }
.heroe .delta--arriba { color: #86efac; }
.heroe .delta--abajo { color: #fecaca; }
.heroe .delta--igual, .heroe .delta span { color: rgba(255, 255, 255, .78); }
.heroe__chispa { margin-top: auto; height: 74px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Cada casilla lleva un ícono 3D de la marca y su color: data-ico = corazon | estrella | rayo | reloj | trofeo | moneda */
.tile { --acento: var(--brand); position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--acento) 10%, var(--surface)) 0%, var(--surface) 72%); border: 1px solid var(--line); border-top: 3px solid var(--acento); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--shadow); }
.tile[data-ico] { padding-right: 18px; }
.tile[data-ico]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; background: center / contain no-repeat; filter: drop-shadow(0 6px 10px rgba(30, 16, 54, .22)); }
.tile[data-ico] .tile__etiqueta { padding-right: 52px; }
.tile[data-ico="corazon"] { --acento: #e8487f; } .tile[data-ico="corazon"]::after { background-image: url(img/marca/icono-corazon.webp); }
.tile[data-ico="estrella"] { --acento: #7c3aed; } .tile[data-ico="estrella"]::after { background-image: url(img/marca/icono-estrella.webp); }
.tile[data-ico="rayo"] { --acento: #0ea5c6; } .tile[data-ico="rayo"]::after { background-image: url(img/marca/icono-rayo.webp); }
.tile[data-ico="reloj"] { --acento: #0f8f8a; } .tile[data-ico="reloj"]::after { background-image: url(img/marca/icono-reloj.webp); }
.tile[data-ico="trofeo"] { --acento: #e0a100; } .tile[data-ico="trofeo"]::after { background-image: url(img/marca/icono-trofeo.webp); }
.tile[data-ico="moneda"] { --acento: #e0a100; } .tile[data-ico="moneda"]::after { background-image: url(img/marca/moneda.webp); }
.tile--juego { --acento: #c026d3; padding-right: 76px; }
.tile--juego::after { content: ""; position: absolute; top: 14px; right: 14px; width: 48px; height: 64px; border-radius: 10px; background: var(--portada) center / cover no-repeat, var(--surface-2); box-shadow: 0 6px 14px -4px rgba(30, 16, 54, .4); transform: rotate(4deg); }
.tile__etiqueta { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tile__valor { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile__valor--texto { font-size: 23px; }
.tile__valor small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.tile__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; flex-wrap: wrap; }
.tile__chispa { width: 92px; height: 26px; flex: none; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; flex-wrap: wrap; }
.delta svg { width: 12px; height: 12px; }
.delta--arriba { color: var(--good-ink); }
.delta--abajo { color: var(--crit-ink); }
.delta--igual, .delta span { color: var(--muted); font-weight: 500; }
.falta { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.falta svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }

/* lista de hallazgos */
.hallazgos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hallazgos li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.hallazgos .ico { --c: var(--brand); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.hallazgos li:nth-child(4n+2) .ico { --c: var(--cian); }
.hallazgos li:nth-child(4n+3) .ico { --c: var(--rosa); }
.hallazgos li:nth-child(4n+4) .ico { --c: var(--gold-ink); }
.hallazgos .ico svg { width: 17px; height: 17px; stroke: var(--c); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hallazgos p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.hallazgos strong { color: var(--ink); font-weight: 650; }

/* barras horizontales */
.barras { display: flex; flex-direction: column; gap: 9px; }
.barra { display: grid; grid-template-columns: minmax(96px, 190px) minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
.barra__nombre { overflow-wrap: anywhere; color: var(--ink); font-weight: 600; }
.barra__nombre--juego { display: flex; align-items: center; gap: 9px; min-width: 0; }
.barra__nombre--juego img { width: 30px; height: 40px; object-fit: cover; border-radius: 7px; flex: none; box-shadow: 0 2px 6px rgba(30, 16, 54, .25); background: var(--surface-2); }
.barra__pista { height: 14px; position: relative; background: var(--surface-2); border-radius: 0 7px 7px 0; }
.barra__relleno { position: absolute; inset: 0 auto 0 0; background: var(--s1); border-radius: 0 7px 7px 0; min-width: 2px; }
.barra__relleno--marca { background: linear-gradient(90deg, #7c3aed, #c026d3 70%, #f472b6); }
.barra__valor { font-weight: 700; }
.barra__valor { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.barra:hover .barra__relleno { filter: brightness(1.08); }
.reparto { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.reparto span { min-width: 4px; }
.leyenda b { color: var(--ink); font-weight: 700; margin-left: 2px; }
.nota-datos { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.nota-datos b { color: var(--ink); }
.nota-datos span { font-weight: 700; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.nuevo { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; color: #fff; background: linear-gradient(90deg, #db2777, #a21caf); padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }

/* gráficas svg */
.grafica { width: 100%; position: relative; min-height: 120px; }
.grafica svg { display: block; width: 100%; overflow: visible; }
.heroe__chispa.grafica { min-height: 0; }
.eje { fill: var(--muted); font-size: 11px; font-family: var(--font-ui); }
.rejilla { stroke: var(--line); stroke-width: 1; }
.base { stroke: var(--line-strong); stroke-width: 1; }
.evento line { stroke: var(--brand); stroke-width: 1; opacity: .55; }
.evento text { fill: var(--brand-ink); font-size: 11px; font-weight: 600; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* tablas */
.tabla-caja { overflow-x: auto; margin-inline: -4px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
th button[aria-sort] { color: var(--ink); }
.mini-barra { display: inline-block; height: 6px; border-radius: 0 3px 3px 0; background: var(--s1); vertical-align: middle; margin-right: 8px; }

/* mapa de calor */
.calor { display: grid; grid-template-columns: 44px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; min-width: 520px; }
.calor div { aspect-ratio: 1 / 1; border-radius: 3px; min-height: 0; }
.calor .rot { aspect-ratio: auto; color: var(--muted); display: flex; align-items: center; }
.calor .hora { aspect-ratio: auto; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.escala { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.escala span.cuadros { display: inline-flex; gap: 2px; }
.escala span.cuadros i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }

/* cohortes */
.cohorte td.celda { text-align: center; font-variant-numeric: tabular-nums; font-size: 12.5px; padding: 8px 4px; border-bottom: 0; }
.cohorte td.celda span { display: block; padding: 6px 2px; border-radius: 6px; }
.cohorte td { border-bottom: 0; white-space: nowrap; }

/* embudo */
.embudo { display: flex; flex-direction: column; gap: 10px; }
.paso { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 12px; align-items: center; }
.paso__nombre { font-size: 13px; }
.paso__nombre small { display: block; color: var(--muted); font-size: 12px; }
.paso__pista { height: 30px; position: relative; }
.paso__barra { position: absolute; inset: 0 auto 0 0; border-radius: 0 6px 6px 0; display: flex; align-items: center; min-width: 3px; }
.paso__valor { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.paso__valor--dentro { color: var(--tinta-sobre-fuerte); }

/* premios */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip--revisar { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.chip--ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); border-color: transparent; }
.chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
td .chip { white-space: normal; max-width: 280px; }
/* Ranking: 6 columnas que caben completas desde 820 px de caja; si la caja es más angosta (tableta, celular),
   cada jugador se vuelve una tarjeta (consulta de contenedor, así no depende del ancho de la pantalla). */
.caja-premios { container-type: inline-size; }
.tabla-premios td .chip--revisar { min-width: 150px; max-width: 230px; border-radius: 10px; align-items: flex-start; }
.tabla-premios td .chip--revisar svg { margin-top: 2px; }
.tabla-premios td:nth-child(4) { white-space: nowrap; }
.tabla-premios .jugador__texto { min-width: 0; }
.jugador__correo { display: block; font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; font-variant-numeric: tabular-nums; }
.valor__sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; white-space: nowrap; }
.solo-cel { display: none; }
.tabla-juegos { min-width: 760px; }
.tend { font-weight: 600; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tend--sube { color: var(--good-ink); }
.tend--baja { color: var(--crit-ink); }
.tile__texto { margin: 0; font-size: 12.5px; color: var(--muted); }
.tile__texto b { font-weight: 650; }
.tile__texto .sube { color: var(--good-ink); }
.tile__texto .baja { color: var(--crit-ink); }
.pos { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
/* medallas: oro, plata y bronce con tinta oscura (se lee en los dos temas) */
.pos--1 { background: linear-gradient(145deg, #ffe27a, #f5b311); color: #4a2d00; box-shadow: 0 3px 8px -2px rgba(245, 179, 17, .7); }
.pos--2 { background: linear-gradient(145deg, #f1f4f9, #b8c2d1); color: #2f3747; box-shadow: 0 3px 8px -2px rgba(120, 132, 152, .6); }
.pos--3 { background: linear-gradient(145deg, #ffcfa1, #d98a4e); color: #4d2509; box-shadow: 0 3px 8px -2px rgba(217, 138, 78, .6); }
.jugador { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.jugador__ini { --c: #7c3aed; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--c); color: #fff; flex: none; }
.lider:nth-child(5n+2) .jugador__ini, tr:nth-child(5n+2) .jugador__ini { --c: #0e86a8; }
.lider:nth-child(5n+3) .jugador__ini, tr:nth-child(5n+3) .jugador__ini { --c: #c0267a; }
.lider:nth-child(5n+4) .jugador__ini, tr:nth-child(5n+4) .jugador__ini { --c: #0f7f6b; }
.lider:nth-child(5n+5) .jugador__ini, tr:nth-child(5n+5) .jugador__ini { --c: #c2410c; }
.jugador__nombre { font-weight: 600; }
.jugador__dato { font-size: 12px; color: var(--muted); }
.estado { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; font-weight: 600; min-height: 32px; }
.estado[data-valor="entregado"] { border-color: color-mix(in srgb, var(--good) 50%, transparent); color: var(--good-ink); }
.estado[data-valor="revisar"] { border-color: color-mix(in srgb, var(--warn) 70%, transparent); color: var(--warn-ink); }
.estado[data-valor="descartado"] { color: var(--muted); }
.quien-cambio { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.excluir { display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.excluir:hover, .excluir:focus-visible { color: var(--ink); border-color: var(--ink-2); }
.excluir svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.excluidos { font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.excluidos summary { cursor: pointer; line-height: 1.45; }
.excluidos summary strong { color: var(--ink); }
.excluidos__lista { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.excluidos__uno small { color: var(--muted); font-size: 11.5px; }
.excluidos__uno { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.excluidos__uno button { border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 6px; border-radius: 999px; }
.excluidos__uno button:hover, .excluidos__uno button:focus-visible { background: var(--surface-2); }
.boton { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 9px 16px; font-weight: 700; font-size: 13px; background: var(--boton-fondo); color: #fff; text-decoration: none; min-height: 40px; box-shadow: 0 8px 18px -10px rgba(124, 58, 237, .9); transition: transform .12s, box-shadow .12s; }
.boton:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(124, 58, 237, .9); }
.boton:not(:disabled):active { transform: translateY(1px); }
.boton--sec { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.boton--sec:not(:disabled):hover { box-shadow: none; background: var(--surface-2); }
.boton:disabled { opacity: .45; }
.boton svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aviso-rol { font-size: 12.5px; color: var(--muted); }
.lider { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lider:last-child { border-bottom: 0; }
.lider__pts { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.lider__pts img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.lider__pts small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }

.regla { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.regla li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; }
.regla svg { width: 16px; height: 16px; stroke: var(--brand); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.historial { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 13px; }
.historial li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.historial li:last-child { border-bottom: 0; }
.historial time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.historial strong { color: var(--ink); font-weight: 600; }

/* vacíos, carga y errores */
.vacio { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 6px 0; }
.vacio h3 { margin: 0; font-size: 14px; font-weight: 600; }
.vacio p { margin: 0; color: var(--ink-2); font-size: 13px; max-width: 60ch; }
.esqueleto { border-radius: var(--r); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) { .esqueleto { animation: brillo 1.2s linear infinite; } @keyframes brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } } }

#tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 260px; }
#tip b { font-weight: 650; }
#tip .fila { display: flex; justify-content: space-between; gap: 14px; }
#tip .fila i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 13px; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }

.vista { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Mundo 3D: el parque a lo ancho y a la derecha la columna con los datos y el ranking ---------- */
.mundo-caja { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.mundo { position: relative; height: max(500px, calc(100vh - 262px)); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg, #bfe6ff 0%, #e8e4ff 55%, #ffd9ef 100%); box-shadow: var(--shadow); isolation: isolate; }
:root[data-theme="dark"] .mundo { background: linear-gradient(180deg, #0a0720 0%, #1a1240 60%, #2c1553 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mundo { background: linear-gradient(180deg, #0a0720 0%, #1a1240 60%, #2c1553 100%); } }
.mundo__escena { position: absolute; inset: 0; }
.mundo__lienzo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.mundo__lienzo:active { cursor: grabbing; }
.mundo__accesible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.mundo__lado { display: flex; flex-direction: column; gap: 16px; height: max(500px, calc(100vh - 262px)); min-height: 0; }
.mundo__panel, .mundo__ranking { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; }
.mundo__panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; flex: none; }
.mundo__panel .mundo__panel-cab { grid-column: 1 / -1; padding-bottom: 2px; }
.mundo__ranking { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mundo__panel-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 6px 8px; font-size: 12px; color: var(--muted); }
.mundo__panel-cab b { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.mundo__dato { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 1px 9px; border: 1px solid var(--line); background: var(--surface-2); padding: 9px 10px; border-radius: 12px; text-align: left; font-size: 12px; color: var(--ink-2); min-width: 0; }
.mundo__dato:last-child { grid-column: 1 / -1; }
.mundo__dato:hover, .mundo__dato:focus-visible { background: var(--brand-soft); color: var(--ink); border-color: transparent; }
.mundo__dato .mundo__etq { line-height: 1.2; overflow-wrap: anywhere; }
.mundo__dato b { color: var(--ink); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; line-height: 1.15; }
.mundo__ico { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.mundo__ico svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ranking-juegos { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.ranking-juegos__fila { width: 100%; display: grid; grid-template-columns: 24px 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 6px; border: 0; border-radius: 10px; background: none; text-align: left; }
.ranking-juegos__fila:hover, .ranking-juegos__fila:focus-visible { background: var(--surface-2); }
.ranking-juegos__fila img { width: 34px; height: 45px; object-fit: cover; border-radius: 6px; background: var(--surface-2); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.ranking-juegos__lugar { font-weight: 700; font-size: 13px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.ranking-juegos__lugar--1, .ranking-juegos__lugar--2, .ranking-juegos__lugar--3 { border-radius: 50%; width: 24px; height: 24px; line-height: 24px; }
.ranking-juegos__lugar--1 { background: linear-gradient(145deg, #ffe27a, #f5b311); color: #4a2d00; }
.ranking-juegos__lugar--2 { background: linear-gradient(145deg, #f1f4f9, #b8c2d1); color: #2f3747; }
.ranking-juegos__lugar--3 { background: linear-gradient(145deg, #ffcfa1, #d98a4e); color: #4d2509; }
.ranking-juegos__texto { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ranking-juegos__texto b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-juegos__barra { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.ranking-juegos__barra i { display: block; height: 100%; border-radius: 3px; }
.ranking-juegos__n { text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.ranking-juegos__n small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.ranking-juegos__vacio { padding: 12px; color: var(--muted); font-size: 13px; }

.mundo__pie { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.mundo__leyenda, .mundo__controles { pointer-events: auto; }
.mundo__leyenda { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 7px 11px; border-radius: 12px; font-size: 12px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); }
.mundo__leyenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.mundo__gente i { margin-right: -2px; border: 1.5px solid var(--surface); }
.mundo__gente i:last-of-type { margin-right: 6px; }
.mundo__escala { color: var(--muted); }
.mundo__controles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mundo__boton { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 12px; border-radius: 11px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: var(--shadow); }
.mundo__boton:hover { background: var(--surface); }
.mundo__boton[aria-pressed="true"] { background: var(--boton-fondo); color: #fff; border-color: transparent; }
.mundo__boton svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mundo__reloj { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; padding: 8px 18px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mundo__reloj b { font-family: var(--font-display); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.mundo__reloj small { font-size: 11.5px; font-weight: 600; color: var(--muted); min-height: 14px; }
.mundo__reloj--fuerte { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.mundo__reloj--fuerte small { color: var(--gold-ink); }
.mundo__ayuda { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2; font-size: 12.5px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 6px 14px; border-radius: 999px; pointer-events: none; transition: opacity .5s; white-space: nowrap; box-shadow: var(--shadow); }
.mundo__ayuda--fuera { opacity: 0; }
.solo-tactil { display: none; }
@media (hover: none) and (pointer: coarse) { .solo-pc { display: none; } .solo-tactil { display: inline; } }
.mundo__cargando { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--bg); color: var(--ink-2); font-weight: 600; transition: opacity .6s; }
.mundo__cargando span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: girar 0.8s linear infinite; }
.mundo__cargando--fuera { opacity: 0; pointer-events: none; }
@keyframes girar { to { transform: rotate(360deg); } }

.mundo__ficha { position: absolute; top: 14px; right: 14px; bottom: 70px; z-index: 5; width: 330px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px -18px rgba(23, 20, 31, .45); animation: fichaEntra .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes fichaEntra { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.ficha__cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ficha__cab h3 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; display: inline; }
.ficha__cab p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.ficha__punto { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 8px; vertical-align: 2px; }
.ficha__datos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ficha__dato { display: flex; flex-direction: column; gap: 2px; padding: 10px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.ficha__dato span { font-size: 11.5px; color: var(--ink-2); }
.ficha__dato b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ficha__dato .delta { font-size: 11.5px; }
.ficha__dato .delta span { display: none; }
.ficha__graf { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); }
.ficha__graf svg { width: 100%; height: 54px; }
.ficha__nota { margin: 0; font-size: 12.5px; color: var(--ink-2); padding: 9px 11px; border-radius: 10px; background: var(--surface-2); }
.ficha__nota--sube { color: var(--good-ink); }
.ficha__nota--baja { color: var(--crit-ink); }
.ficha__nota--alerta { background: var(--warn-soft); color: var(--warn-ink); }
.ficha__ir { justify-content: center; margin-top: auto; }
.ficha__ir svg { width: 15px; height: 15px; }
.ficha__lideres { display: flex; flex-direction: column; }
.ficha__lideres .jugador { min-width: 0; }
.mundo-caja:fullscreen { background: var(--bg); padding: 16px; }
.mundo-caja:fullscreen .mundo, .mundo-caja:fullscreen .mundo__lado { height: calc(100vh - 32px); }

@media (max-width: 1180px) {
  .mundo-caja { grid-template-columns: minmax(0, 1fr); }
  .mundo__lado { height: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ranking-juegos { max-height: 360px; }
}
@media (max-width: 760px) {
  .mundo { height: max(420px, calc(100svh - 260px)); border-radius: 14px; }
  .mundo__lado { grid-template-columns: minmax(0, 1fr); }
  .mundo__panel { padding: 8px; }
  .mundo__dato b { font-size: 16px; }
  .mundo__pie { left: 8px; right: 8px; bottom: 8px; }
  .mundo__boton span { display: none; }
  .mundo__boton { padding: 8px 10px; }
  .mundo__ayuda { top: 10px; font-size: 11px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 24px); }
  .mundo__ficha { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 66%; animation-name: fichaSube; }
  @keyframes fichaSube { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (max-height: 520px) and (orientation: landscape) {
  .mundo { height: max(300px, calc(100svh - 40px)); }
  .mundo__boton span { display: none; }
  .mundo__boton { padding: 8px 10px; }
  .mundo__ayuda { display: none; }
  .mundo__ficha { top: 8px; bottom: 8px; right: 8px; width: 300px; max-height: none; left: auto; }
}

/* ---------- Entrada ---------- */
.entrada { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.entrada__marca { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 48px clamp(28px, 6vw, 80px); color: #fff; background: var(--marca-fondo); }
.entrada__marca::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: radial-gradient(circle, rgba(255, 255, 255, .9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(255, 255, 255, .6) 0 1px, transparent 2px); background-size: 52px 52px, 31px 31px; background-position: 10px 14px, 25px 5px; -webkit-mask-image: radial-gradient(70% 60% at 100% 0%, #000, transparent 75%), radial-gradient(60% 50% at 0% 100%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 100% 0%, #000, transparent 75%), radial-gradient(60% 50% at 0% 100%, #000, transparent 75%); }
.entrada__marca::after { content: ""; position: absolute; z-index: -1; inset: auto -20% -40% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 61, .35), transparent 65%); }
.entrada__logo { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; }
.entrada__logo img { width: 64px; height: 64px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .35)); }
.entrada__logo b { color: #ffc83d; }
.entrada__logo small { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .78); margin-top: 3px; }
.entrada__decor { position: absolute; z-index: -1; width: 64px; height: 64px; filter: drop-shadow(0 10px 16px rgba(30, 16, 54, .4)); pointer-events: none; }
.entrada__decor--moneda { top: 14%; right: 12%; transform: rotate(-12deg); }
.entrada__decor--estrella { bottom: 30%; left: 6%; width: 52px; height: 52px; transform: rotate(14deg); opacity: .9; }
.entrada__decor--trofeo { top: 46%; right: 6%; width: 56px; height: 56px; transform: rotate(8deg); }
@media (prefers-reduced-motion: no-preference) { .entrada__decor { animation: flotar 5s ease-in-out infinite alternate; } .entrada__decor--estrella { animation-delay: -2s; } .entrada__decor--trofeo { animation-delay: -3.5s; } @keyframes flotar { to { translate: 0 -10px; } } }
.entrada__marca h1 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.02em; max-width: 14ch; text-wrap: balance; position: relative; z-index: 1; }
.entrada__marca p { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .82); max-width: 36ch; position: relative; z-index: 1; }
.entrada__simi { width: min(260px, 40%); height: auto; align-self: flex-end; margin-top: 8px; position: relative; z-index: 1; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.entrada__caja { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
.entrada__tarjeta { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; }
.entrada__form { display: flex; flex-direction: column; gap: 14px; }
.entrada__form h2 { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -.01em; }
.entrada__nota { margin: -6px 0 2px; color: var(--ink-2); font-size: 14px; }
.entrada__form label, .dialogo__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.entrada__form input, .dialogo__form input { font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.entrada__form input:focus, .dialogo__form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.clave { position: relative; display: block; }
.clave input { padding-right: 48px; }
.clave__ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.clave__ver svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.boton--grande { justify-content: center; min-height: 48px; font-size: 15px; border-radius: 12px; }
.entrada__enlaces { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.enlace { border: 0; background: none; padding: 4px 0; color: var(--brand-ink); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.entrada__mensaje { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--crit-soft); color: var(--crit-ink); }
.entrada__mensaje[data-tipo="ok"] { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.entrada__pie { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .entrada { grid-template-columns: minmax(0, 1fr); }
  .entrada__marca { padding: calc(28px + env(safe-area-inset-top, 0px)) 22px 28px; gap: 10px; }
  .entrada__marca h1 { font-size: 26px; max-width: none; }
  .entrada__marca p { font-size: 14px; }
  .entrada__marca { padding-right: 116px; }
  .entrada__simi { position: absolute; right: 6px; bottom: -16px; width: 104px; opacity: .97; }
  .entrada__logo img { width: 48px; height: 48px; }
  .entrada__logo { font-size: 22px; }
  .entrada__decor { display: none; }
  .entrada__caja { justify-content: flex-start; padding-top: 22px; }
  .entrada__tarjeta { padding: 22px; }
}

/* ---------- Estado de los datos, accesos y carga de reportes ---------- */
.fuentes__cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.fuentes__cab h3 { margin: 0; }
.fuentes__boton { border: 0; background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 800; color: #5b21b6; }
.fuentes__boton:hover { background: #ffc83d; color: #1e1036; }
.fuentes__progreso { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.fuentes .giro { border-color: rgba(255, 255, 255, .25); border-top-color: #ffc83d; }
.fuentes__error { margin: 6px 0 0; font-size: 11.5px; color: #fecaca; }
.fuentes__nota { margin: 6px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.fuentes a { color: #ffd36b; }
.giro { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand-soft); border-top-color: var(--brand); animation: girar .8s linear infinite; flex: none; display: inline-block; }
.ejemplo--info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); align-items: center; }
.ejemplo--info .giro { width: 18px; height: 18px; }
.espera { flex-direction: row; align-items: center; gap: 18px; padding: 28px; }
.espera img { flex: none; width: 110px; height: auto; }
.espera h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 6px; }
.espera p { margin: 0; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 560px) { .espera { flex-direction: column; text-align: center; } }

.dialogo { border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.dialogo::backdrop { background: rgba(15, 14, 21, .45); }
.dialogo__cab { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.dialogo__cab h2 { margin: 0; font-family: var(--font-display); font-size: 21px; }
.dialogo__cab p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.dialogo__form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.dialogo__form small { font-weight: 500; color: var(--muted); }
.dialogo__form input { min-height: 42px; padding: 9px 12px; font-size: 15px; }
.dialogo__form .boton { min-height: 42px; }
@media (max-width: 560px) { .dialogo__form { grid-template-columns: minmax(0, 1fr); } }
.accesos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.accesos li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.accesos li div { display: flex; flex-direction: column; min-width: 0; }
.accesos b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.accesos small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.accesos__yo { font-size: 11.5px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 2px 9px; }
.accesos__cargando { color: var(--muted); font-size: 13px; padding: 10px 2px; }

.carga { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.carga__caja { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 4px 12px; padding: 16px; border-radius: 14px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer; }
.carga__caja:hover, .carga__caja:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.carga__caja input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.carga__icono { grid-row: span 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.carga__icono svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.carga__caja b { font-size: 14px; }
.carga__caja span:not(.carga__icono):not(.carga__boton) { font-size: 12.5px; color: var(--ink-2); }
.carga__boton { justify-self: start; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 4px 10px; }
@media (max-width: 760px) { .carga { grid-template-columns: minmax(0, 1fr); } }
#sincronizar-tope { display: none; }
@media (max-width: 900px) { #sincronizar-tope:not([hidden]) { display: grid; } }

@media (max-width: 1180px) {
  .g-resumen, .g-main { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: auto; z-index: 8; flex-direction: row; align-items: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 8px calc(16px + env(safe-area-inset-left, 0px)); background: linear-gradient(90deg, #2a1272, #1e1036); overflow-x: auto; scrollbar-width: none; box-shadow: 0 8px 20px -14px rgba(30, 16, 54, .8); }
  .side::-webkit-scrollbar { display: none; }
  .marca__sub, .fuentes, .nav__grupo { display: none; }
  .marca__logo { width: 38px; height: 38px; }
  .marca__nombre { font-size: 18px; }
  .nav { flex-direction: row; gap: 4px; }
  .nav button { white-space: nowrap; padding: 7px 11px; }
  .main { padding: 16px calc(16px + env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px)); }
  .filtros { position: static; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .filtros__fecha { margin-left: 0; text-align: left; }
  .tope { padding: 18px 150px 18px 20px; min-height: 100px; border-radius: 18px; }
  .tope__simi { height: 124px; right: 12px; bottom: -26px; }
}
@media (max-width: 560px) {
  .tiles, .g-4 { grid-template-columns: minmax(0, 1fr); }
  .heroe__cifra { font-size: 48px; }
  .tope { padding: 16px 104px 16px 18px; gap: 12px; }
  .tope h1 { font-size: 25px; }
  .tope__sub { font-size: 13px; }
  .tope__simi { height: 112px; right: 2px; bottom: -22px; }
  .quien__texto { display: none; }
  /* en celular cada barra va en dos renglones: nombre y cifra arriba, la barra abajo a todo lo ancho */
  .barra { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .barra__pista { grid-column: 1 / -1; grid-row: 2; }
  .barra__valor { grid-column: 2; grid-row: 1; }
  .paso { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .card { padding: 16px; }
}
/* Ranking en caja angosta: cada jugador es una tarjeta, sin deslizar de lado */
@container (max-width: 819px) {
  .tabla-premios thead { display: none; }
  .tabla-premios, .tabla-premios tbody { display: block; }
  .tabla-premios tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .tabla-premios tr:last-child { border-bottom: 0; }
  .tabla-premios td { display: block; padding: 0; border: 0; background: none !important; text-align: left; white-space: normal !important; }
  .tabla-premios td:nth-child(3) { text-align: right; }
  .tabla-premios td:nth-child(n+4) { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
  .tabla-premios td[data-etiqueta]::before { content: attr(data-etiqueta); color: var(--muted); font-size: 12px; flex: none; width: 74px; }
  .tabla-premios td .chip--revisar { min-width: 0; max-width: none; }
  .tabla-premios td:nth-child(6) { flex-wrap: wrap; }
  .tabla-premios td:nth-child(6) .quien-cambio, .tabla-premios td:nth-child(6) .excluir { margin: 0; }
  .tabla-premios .jugador { min-width: 0; }
  .tabla-premios .jugador__dato { white-space: normal; }
  .jugador__correo { max-width: 100%; }
  .valor__sub { white-space: normal; }
  .solo-cel { display: inline; }
}
@media (prefers-reduced-motion: no-preference) {
  .barra__relleno, .paso__barra, .mini-barra { transition: width .5s cubic-bezier(.2,.8,.2,1); }
  .vista { animation: aparecer .25s ease-out; }
  @keyframes aparecer { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  .tile, .card:not(.heroe) { transition: transform .18s ease, box-shadow .18s ease; }
  .tile:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(76, 29, 149, .45); }
}
/* Celular acostado: el letrero se encoge para dejar lugar a los datos */
@media (max-height: 520px) and (orientation: landscape) {
  .tope { min-height: 0; padding-top: 12px; padding-bottom: 12px; padding-right: 116px; }
  .tope h1 { font-size: 22px; }
  .tope__sub { display: none; }
  .tope__simi { height: 92px; bottom: -18px; }
}
