/* Resto: texto SEO, pie, datos de la ficha, anuncios y bloques bajo el primer pantallazo.
   En producción se carga sin bloquear el primer pintado. */

.chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--chip);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    scroll-snap-align: start;
  }
  .chip:hover { border-color: var(--blue); color: var(--blue); }
  .explore { margin: 22px 0 0; }
  .seo {
    margin: 28px 0;
    padding: 28px 28px 32px;
    border-radius: 22px;
    background: #141c30;
    border: 1px solid rgba(122, 240, 255, .16);
  }
  .seo-lead {
    display: grid;
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
    gap: 12px 48px;
    align-items: start;
    margin-bottom: 36px;
  }
  .seo h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -.03em;
  }
  .seo h2 {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.3;
  }
  .seo p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.6;
  }
  .seo-lead p:last-child { margin-bottom: 0; }
  .seo .chip { color: var(--ink); text-decoration: none; }
  .seo .chip:hover { color: var(--blue); text-decoration: none; }
  .seo-types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 28px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
  }
  .seo-types li { margin: 0; color: var(--muted); line-height: 1.5; }
  .seo-faq {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 40px;
  }
  .seo-faq h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
  }
  .seo-faq p { margin: 0; }
  .explore-grid {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .tile {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 4px 8px;
    border-radius: 14px;
    background: #163044;
    border: 1px solid rgba(122, 240, 255, .32);
    color: #7af0ff;
    text-decoration: none;
    text-align: center;
  }
  .tile-ico { width: 22px; height: 22px; display: block; }
  .tile-ico svg { width: 100%; height: 100%; display: block; }
  .tile-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
  }
  .tile:hover {
    border-color: #7af0ff;
    background: #1c4660;
    color: #fff;
  }
  .shelf {
    --cell: 132px;
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--cell));
    grid-auto-rows: calc(var(--cell) * 3 / 4);
    grid-auto-flow: dense;
    gap: 12px;
    justify-content: start;
    padding-bottom: 2px;
  }
  .sub-cover {
    margin: 0;
    cursor: default;
    aspect-ratio: auto;
  }
  .cover-row {
    width: min(100%, 372px);
    margin: 4px 0 18px;
  }
  .cover-row .sub-cover { aspect-ratio: 4 / 3; }
  .seo-pic {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin: 0;
  }
  .seo-copy h2:first-child { margin-top: 0; }
  .sub-cover:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, .38);
    z-index: auto;
  }
.chip:focus-visible, .tile:focus-visible {
    outline: 3px solid #7af0ff;
    outline-offset: 3px;
  }
  @media (max-width: 740px) {
    .explore-grid { overflow-x: auto; scrollbar-width: none; }
    .explore-grid::-webkit-scrollbar { display: none; }
    .tile { flex: 0 0 84px; min-width: 84px; padding: 8px 4px 6px; border-radius: 12px; }
    .tile-ico { width: 18px; height: 18px; }
    .tile-name { font-size: 10px; }
    .seo { padding: 18px 16px 22px; }
    .seo-lead, .seo-types, .seo-faq { grid-template-columns: 1fr; }
    .seo-types { margin-bottom: 28px; }}
  @media (prefers-reduced-motion: reduce) {
    .walk-play, .walk-face:hover .walk-play { transition: none; transform: translate(-50%, -50%); }}
  .orden {
    position: relative;
    flex: none;
    margin: 0 0 0 auto;
  }
  .orden select {
    appearance: none;
    height: 42px;
    max-width: 46vw;
    padding: 0 38px 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--chip);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
  }
  .orden svg {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
  }
  .orden select:focus-visible { outline: 3px solid #7af0ff; outline-offset: 2px; }
  .strip {
    --cell: 168px;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: calc(var(--cell) * 3 / 4);
    grid-auto-columns: var(--cell);
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 12px;
    margin-inline: -12px;
    padding: 10px 12px 16px;
    scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 4px;
  }
.pager span, .pager button {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .pager :is(a, span, button)[aria-current="page"] { background: var(--blue); color: #06202a; border-color: transparent; }
.pager button:hover { border-color: var(--blue); }
  .ad {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: repeating-linear-gradient(-45deg, var(--chip), var(--chip) 8px, transparent 8px, transparent 16px);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .ad small { font-weight: 600; letter-spacing: 0; text-transform: none; }
  .ad-leader { width: min(728px, 100%); height: 90px; margin: 14px auto 0; }
  .ad-mrec { width: 300px; max-width: 100%; height: 250px; }
  .ad-half { width: 300px; max-width: 100%; height: 600px; margin: 14px auto 0; }
  .tag-row, .sibs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
  .ad-col { position: sticky; top: 78px; }
  .game-copy {
    margin-top: 18px;
    padding: 22px 24px 26px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--line);
  }
  .game-copy h2 { margin: 22px 0 8px; font-size: 22px; }
  .game-copy h2:first-child { margin-top: 0; }
  .game-copy p, .game-copy li { color: var(--muted); }
  .game-copy ul { margin: 0; padding-left: 18px; }
  .seo.game-copy {
    margin: 28px 0;
    padding: 28px 28px 32px;
    background: #141c30;
    border: 1px solid rgba(122, 240, 255, .16);
  }
  .near { margin-top: 16px; }
  .near-label {
    margin: 14px 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .near-label:first-child { margin-top: 0; }
  .near-games { display: flex; flex-wrap: wrap; gap: 10px; }
  .near-card {
    display: grid;
    width: 132px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
  }
  .near-card span {
    padding: 7px 8px 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
  }
  .near-card:hover { border-color: var(--blue); }
  .near-tags { display: flex; flex-wrap: wrap; gap: 8px; }
  .game-copy .near-tags { margin-top: 26px; }
  .box-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
  }
  .box-tag:hover { border-color: var(--blue); color: var(--blue); }
  .seo .box-tag { color: var(--ink); text-decoration: none; }
  .seo .box-tag:hover { color: var(--blue); text-decoration: none; }
  .game-head {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px 28px;
    align-items: center;
  }
  .game-head h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.05;
  }
  .seo .game-lead {
    margin: 22px 0 0;
    line-height: 1.55;
  }
  .game-prose { margin-top: 22px; }
  .game-prose h2 { margin: 22px 0 8px; font-size: 22px; }
  .game-prose p, .game-prose li { line-height: 1.55; }
  .game-prose p { margin: 0 0 12px; }
  .game-prose ol { margin: 0 0 4px; padding-left: 18px; }
  .game-prose li { margin: 0 0 8px; }
  .facts {
    margin: 28px 0 0;
    border-top: 1px solid var(--line);
  }
  .facts div {
    display: grid;
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
    gap: 12px 24px;
    align-items: center;
    margin: 0;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
  }
  .facts dt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
  }
  .facts dt svg { flex: none; color: var(--blue); }
  .facts dd {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.4;
  }
  .box-tag .ico, .chip .ico, .facts .ico { font-size: 16px; line-height: 1; }
  .controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .controls li {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--chip);
    color: var(--ink);
    font-weight: 700;
  }
  .walk-stage {
    position: relative;
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    background: #070b14;
  }
.walk-stage iframe, .walk-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }
  .walk-face {
    padding: 0;
    cursor: pointer;
    color: #111;
  }
  .walk-face::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 10, 20, .45), rgba(6, 10, 20, .08));
  }
  .walk-play {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45));
    transition: transform .16s ease;
  }
  .walk-face:hover .walk-play { transform: translate(-50%, -50%) scale(1.06); }
  .walk-face:focus-visible {
    outline: 3px solid #7af0ff;
    outline-offset: -6px;
  }
  @media (max-width: 900px) {
    .ad-col { position: static; }
    .ad-mrec { margin: 14px auto 0; }}
  @media (max-width: 740px) {
    .game-copy { padding: 16px; }
    .game-head { grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
    .game-head h1 { font-size: 26px; }
    .facts div { grid-template-columns: 1fr; gap: 4px; align-items: start; }
    .near-card { width: calc(50% - 5px); }}

  .ad-mobile { display: none; }
  @media (max-width: 900px) {
    .ad-col { display: none; }
    .ad-mobile { display: grid; }}
  .home-alt .seo { margin-top: 48px; }
  .home-alt .seo-lead h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -.03em;
  }

  .estilos { margin-top: 36px; }
  .estilos .estilo-t { margin: 0 0 6px; font-size: 26px; letter-spacing: -.03em; }
  .estilos > p:not(.estilo-t) { margin: 0; color: var(--muted); }
  .mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
  }
  .mood {
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 118px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--line);
  }
  .mood:hover { transform: translateY(-3px); border-color: var(--blue); }
  .mood:focus-visible { outline: 3px solid #7af0ff; outline-offset: 3px; }
  .mood-e { font-size: 28px; line-height: 1; margin-bottom: 10px; }
  .mood-t { font-weight: 800; letter-spacing: -.02em; }
  .mood-s { font-size: 13px; line-height: 1.3; color: var(--muted); }
  .sorpresa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 22px;
    background: #141c30;
    color: #f4f7fb;
    border: 1px solid rgba(122, 240, 255, .16);
  }
  .sorpresa .azar-t { margin: 0 0 6px; font-size: 26px; letter-spacing: -.03em; }
  .sorpresa p:not(.azar-t) { margin: 0; color: rgba(244, 247, 251, .78); }
  @media (prefers-reduced-motion: reduce) {
    .mood:hover { transform: none; }}
  .home-4 .estilos { margin: 28px 0; }
  .home-4 .mood-grid {
    --mood-cols: 8;
    grid-template-columns: repeat(var(--mood-cols), minmax(168px, 1fr));
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: row;
    grid-auto-columns: minmax(168px, 1fr);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin: 16px -12px 0;
    padding: 6px 12px 10px;
  }
  .home-4 .mood-grid::-webkit-scrollbar { display: none; }
  .home-4 .mood-grid > li { display: flex; scroll-snap-align: start; }
  .home-4 .mood { flex: 1; width: 100%; height: 100%; min-height: 156px; }
  .home-4 .mood-e { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px; }
  .home-4 .mood-t { min-height: 1.2em; }
  .home-4 .mood-s { min-height: 2.6em; }
  .home-4 .sorpresa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: auto;
    margin: 28px 0;
    padding: 32px 36px;
    border-radius: 22px;
    text-align: left;
    background:
      radial-gradient(80% 160% at 100% 50%, rgba(230, 172, 0, .42), transparent 62%),
      #141c30;
    border-color: rgba(230, 172, 0, .28);
  }
  .home-4 .sorpresa .azar-t { font-size: clamp(28px, 3vw, 36px); }
  .home-4 .sorpresa p:not(.azar-t) { font-size: 16px; max-width: 46ch; }
  @media (max-width: 740px) {
    .home-4 .sorpresa { flex-direction: column; align-items: flex-start; padding: 22px; }}
  .home-4 .site-foot {
    margin-top: 12px;
    padding: 36px 0 8px;
    background: var(--card);
    border-top: 1px solid var(--line);
    color: var(--ink);
  }
  .home-4 .foot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 36px 28px;
  }
  .home-4 .foot-brand p { margin: 14px 0 0; max-width: 36ch; color: var(--muted); }
  .home-4 .foot-kicker { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .home-4 .site-foot ul { margin: 12px 0 0; padding: 0; list-style: none; }
  .home-4 .site-foot nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .home-4 .foot-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
  .home-4 .foot-base {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
  }
  .home-4 .foot-base p { margin: 0; }
  @media (max-width: 740px) {
    .home-4 .foot-grid { grid-template-columns: 1fr; gap: 22px; }
    .home-4 .site-foot { padding-top: 28px; }}

/* ---- Ajustes para la web (CodeIgniter) ---- */
/* Ventanas estrechas: la columna de publicidad pasa debajo del contenido (cada anuncio va una sola vez en la página) */
@media (max-width: 900px) {
  .ad-col { display: block; position: static; }
  .ad-col .ad { margin: 14px auto 0; }
}
/* Línea de copyright centrada */
.home-4 .foot-base { justify-content: center; text-align: center; }
/* Pie: Información en una columna; Top juegos (lista numerada) en dos, 1-5 y 6-10 */
.home-4 .site-foot nav ul { grid-template-columns: 1fr; }
.home-4 .site-foot nav ol { margin: 12px 0 0; padding-left: 1.5em; columns: 2; column-gap: 32px; }
.home-4 .site-foot nav ol li { margin: 0 0 8px; break-inside: avoid; }
@media (min-width: 741px) {
  .home-4 .foot-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) minmax(0, .8fr); }
}
/* Enlace del género en la ficha: sin subrayado (ya va en color) */
.seo .facts dd a { text-decoration: none; }
.seo .facts dd a:hover { text-decoration: underline; }
/* Pie: selector de idioma (botón con la bandera actual; el panel se abre hacia arriba) */
.home-4 .foot-langs { display: flex; justify-content: center; margin-top: 24px; }
.lang-pick { position: relative; }
.home-4 .lang-pick summary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; list-style: none;
}
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-135deg) translate(-2px, -1px); }
.lang-pick[open] summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.lang-pick summary:hover, .lang-pick[open] summary { border-color: var(--blue); }
.lang-pick img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--line); }
.lang-panel {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 30;
  width: min(720px, calc(100vw - 32px)); padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.lang-title { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.lang-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.home-4 .site-foot .lang-grid a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--blue); text-decoration: none; font-size: 14px; }
.home-4 .site-foot .lang-grid a:hover { background: var(--chip); }
.home-4 .site-foot .lang-grid a[aria-current] { color: var(--ink); font-weight: 700; }
@media (max-width: 740px) { .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Selector de idioma en modo claro: el pie es azul con enlaces blancos, el panel es blanco */
html[data-theme="light"] .home-4 .site-foot .lang-grid a { color: var(--blue); }
html[data-theme="light"] .home-4 .site-foot .lang-grid a:hover { color: var(--blue); }
html[data-theme="light"] .home-4 .site-foot .lang-grid a[aria-current] { color: var(--ink); }
html[data-theme="light"] .home-4 .lang-pick summary { color: #fff; border-color: rgba(255, 255, 255, .45); }
html[data-theme="light"] .home-4 .lang-pick summary:hover, html[data-theme="light"] .home-4 .lang-pick[open] summary { border-color: #fff; }
/* Ficha en móvil: migas y H1 a todo el ancho (la carátula ya está en el reproductor y en la barra) */
@media (max-width: 740px) {
  .game-head { grid-template-columns: 1fr !important; gap: 8px; }
  .game-head .game-side { display: none; }
  .game-head h1 { font-size: 24px; line-height: 1.2; }
}
/* Pantalla del juego en móvil (juego_iframe2): menú del botón flotante con los mismos estilos que antes */
#load_frame .grid-games { display: flex; flex-wrap: wrap; padding: 0 6px; }
#load_frame .box { position: relative; display: block; flex-basis: calc(50% - 12px); max-width: calc(50% - 12px); margin: 3px; background: #fff; border: 3px solid #cbeaf5; border-radius: 5px; color: #4a4a4a; text-decoration: none; }
#load_frame .box img { width: 100%; height: auto; border-radius: 5px; vertical-align: middle; }
#load_frame .box .title { max-width: 90%; margin: 0 auto; padding: 5px 0; color: #337ab7; font-size: 14px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Ficha en móvil: barra del juego en dos filas (miniatura y nombre; debajo los botones) y espacios más ajustados */
@media (max-width: 740px) {
  .play-bar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 10px 10px; }
  .play-bar > img { width: 48px; height: 36px; }
  .play-name { flex: 1 1 0; min-width: 0; font-size: 15px; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .play-actions { flex: 1 1 100%; display: flex; justify-content: flex-start; gap: 8px; margin: 0; }
  .play-actions button { height: 36px; }
  .near { margin-top: 10px; }
  .near .band { margin: 0; padding: 10px; border-radius: 16px; }
  .near .rail { padding: 2px 2px 4px; }
  .game-copy { margin-top: 12px !important; padding: 16px !important; }
  .game-copy h2 { margin: 18px 0 6px; font-size: 20px; }
  .game-copy .game-about { margin-top: 12px; }
  .game-lead { margin-top: 6px; }
  .game-prose h3 { margin: 14px 0 4px; }
  .crumbs { margin-bottom: 4px; }
  .game-copy .near-tags { margin-top: 14px; }
  .facts { margin-top: 14px; }
  .facts div { padding: 8px 2px; gap: 2px; }
  .facts dd { font-size: 15px; }
  .sibs { margin-top: 8px; gap: 6px; }
  .walk-stage { margin-top: 8px; }
}
/* Subcategoría: orden (enlaces), subcategoría actual y listas de más visitados / nuevos */
.orden-enlaces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.orden-pre { color: var(--muted); font-size: 14px; font-weight: 700; margin-right: 2px; }
.orden-enlaces .chip { text-decoration: none; }
.orden-enlaces .chip[aria-current], .sibs .chip[aria-current] { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.seo-listas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; margin-top: 18px; }
.seo-listas h3 { margin: 0 0 8px; font-size: 17px; }
.seo-listas ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.seo .seo-listas a { color: var(--ink); text-decoration: none; }
.seo .seo-listas a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 740px) {
  .seo-listas { grid-template-columns: 1fr; }
  .page-head .head-row { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 480px) {
  .orden-enlaces { gap: 4px; }
  .orden-pre { font-size: 13px; }
  .orden-enlaces .chip { padding: 5px 9px; font-size: 13px; }
}
@media (max-width: 480px) {
  .orden-pre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* lo siguen leyendo los lectores de pantalla */
}
@media (max-width: 740px) {
  main.wrap > .seo { padding: 16px; margin-top: 14px; }
  .seo-listas h3 { font-size: 16px; }
}
/* Paginador: enlaces sin subrayado y número centrado en su casilla (el diseño usaba botones) */
.pager a, .pager span { display: inline-grid; place-items: center; text-decoration: none; box-sizing: border-box; line-height: 1; }
.pager a:hover { text-decoration: none; color: var(--blue); }
/* Subtítulo de la página (bajo el H1): más pequeño en móvil */
@media (max-width: 740px) { .lede { font-size: 15px; line-height: 1.4; } }
/* Categoría principal: bloque "Todos los juegos de X" con el paginador hacia el listado completo */
.todos { margin: 30px 0 8px; text-align: center; }
.todos .sec-title { justify-content: center; font-size: 22px; margin: 0; }
.todos .pager { margin-top: 12px; }
@media (max-width: 740px) { .todos { margin-top: 18px; } .todos .sec-title { font-size: 19px; } }
/* Listado de tags: el nombre siempre visible, abajo, pequeño y sobre un degradado oscuro para que se lea */
.card.card-tag .name, .card.card-tag:hover .name { opacity: 1; transform: none; padding: 26px 8px 7px; }
.card.card-tag .title { font-size: 15px; line-height: 1.2; white-space: normal; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.card.card-tag .meta { display: none; }
/* Páginas de texto (aviso legal, cookies, bases, contacto) y de idiomas */
.texto-pagina .game-prose { max-width: 90ch; }
.texto-pagina h2, .texto-pagina h3, .texto-pagina h4 { margin: 22px 0 8px; }
.texto-pagina table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.texto-pagina th, .texto-pagina td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.texto-pagina .game-prose { overflow-x: auto; }
.idiomas-pagina .lang-grid a { color: var(--blue); text-decoration: none; }
.idiomas-pagina .lang-grid a[aria-current] { color: var(--ink); font-weight: 700; }
@media (max-width: 740px) { main.wrap > .texto-pagina, main.wrap > .idiomas-pagina { padding: 16px; margin-top: 12px; } }
/* Todas las categorías (/categorias): banda de color por categoría con imagen, título, extracto y subcategorías */
.cat-todas { margin-top: 18px; }
.cat-todas .cat-cab { display: flex; gap: 16px; align-items: flex-start; }
.cat-todas .cat-cab img { width: 160px; height: auto; aspect-ratio: 160 / 108; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.cat-todas .sec-sub { margin-top: 6px; max-width: 90ch; line-height: 1.45; }
.cat-todas .sibs { margin-top: 14px; }
@media (max-width: 740px) {
  .cat-todas .cat-cab img { width: 96px; border-radius: 10px; }
  .cat-todas .sec-title { font-size: 21px; }
}
/* Rankings: podio (2.º, 1.º y 3.º) y lista del 4 al 100 */
.ranking { margin-top: 18px; }
.podio { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 0; padding: 0; list-style: none; }
.podio li { flex: 0 1 220px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.podio img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--soft, #e8eef6); }
.podio-nombre { margin: 0; font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.podio-puesto { display: grid; place-items: end center; width: 100%; padding-bottom: 10px; border-radius: 14px 14px 0 0; background: var(--blue); color: #fff; font-weight: 800; font-size: 34px; }
.podio-1 .podio-puesto { height: 150px; background: #e6ac00; }
.podio-2 .podio-puesto { height: 110px; }
.podio-3 .podio-puesto { height: 80px; background: #c0703a; }
.ranking-lista { margin: 22px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.ranking-lista li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ranking-lista .puesto { width: 2.5em; font-size: 20px; font-weight: 700; color: var(--muted); text-align: right; }
.ranking-lista img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ranking-lista .nombre { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.monedas { display: inline-flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.monedas .icono { display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -1px; background-repeat: no-repeat; }
.icono.diamante { background-image: url(https://cdn.todojuegosgratis.es/assets/img/monedas/mini/diamante.png); }
.icono.oro { background-image: url(https://cdn.todojuegosgratis.es/assets/img/monedas/mini/oro.png); }
.icono.plata { background-image: url(https://cdn.todojuegosgratis.es/assets/img/monedas/mini/plata.png); }
.icono.bronce { background-image: url(https://cdn.todojuegosgratis.es/assets/img/monedas/mini/bronce.png); }
@media (max-width: 740px) {
  .podio { gap: 8px; }
  .podio img { width: 64px; height: 64px; }
  .podio-nombre { font-size: 14px; }
  .podio .monedas { justify-content: center; font-size: 12px; gap: 4px; }
  .podio-1 .podio-puesto { height: 110px; } .podio-2 .podio-puesto { height: 80px; } .podio-3 .podio-puesto { height: 60px; }
  .ranking-lista .monedas { font-size: 12px; gap: 4px; }
  .ranking-lista .puesto { font-size: 16px; width: 2em; }
}
