:root {
  --fondo: #ffffff;
  --panel: #f5f6f8;
  --panel-2: #eceef2;
  --borde: #dde1e8;
  --texto: #14171f;
  --suave: #5f6878;
  --acento: #ff7a00;      /* naranja de la marca */
  --ok: #1f9d55;
  --mal: #e5484d;
  --radio: 14px;
  --sombra: 0 6px 20px rgba(20, 23, 31, .08);
  --color: var(--acento);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- cabecera */
.cabecera {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 60px 8px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
/* Logo: texto con degradado. Grande en la portada, compacto en el resto. */
.marca {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #ff7a00;
  -webkit-text-stroke: 1.5px #16181d;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #16181d;
  transition: font-size .2s ease;
}
.es-inicio .cabecera { padding-top: clamp(52px, 9vw, 64px); }
.es-inicio .marca {
  font-size: clamp(46px, 14vw, 104px);
  letter-spacing: 0.04em;
  -webkit-text-stroke: clamp(2px, .6vw, 4px) #16181d;
  text-shadow: clamp(3px, .8vw, 7px) clamp(3px, .8vw, 7px) 0 #16181d;
}
.cabecera .boton-icono { position: absolute; right: 16px; top: 12px; }
.boton-icono {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--borde);
  background: var(--panel);
  font-weight: 800;
  cursor: pointer;
}

main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 4px 16px 32px;
  outline: none;
}


/* ---------------------------------------------------------------- botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: var(--panel-2);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, background .2s ease;
}
.boton:hover { background: #e2e5eb; }
.boton:active { transform: scale(.97); }
.boton .icono-pixel { flex: none; width: 24px; height: auto; margin-left: -4px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .18)); }
.boton:hover .icono-pixel { animation: salta-icono .35s ease; }
@keyframes salta-icono { 50% { transform: translateY(-3px) rotate(-8deg); } }
.boton-primario { background: var(--color); border-color: transparent; color: #14171f; }
.boton-primario:hover { background: var(--color); filter: brightness(1.08); }

.volver { color: var(--suave); text-decoration: none; font-weight: 600; font-size: 14px; }
.volver:hover { color: var(--texto); }

/* ---------------------------------------------------------------- inicio */
.hero { text-align: center; padding: 6px 4px 28px; }
.hero h1 { font-size: clamp(18px, 4.4vw, 24px); line-height: 1.25; margin: 0 0 6px; font-weight: 700; }
.hero p { color: var(--suave); margin: 0 auto; max-width: 440px; font-size: 15px; }

/* Portada: tarjetas de los juegos, estilo cartel (borde grueso y sombra dura) */
.pagina-cartel main { max-width: 1000px; }
.pagina-cartel .hero h1 { text-transform: uppercase; letter-spacing: .02em; font-weight: 900; }
.rejilla-juegos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 6px 6px 10px; }
.tarjeta-juego {
  --tinta: #16181d;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 330px;
  padding: 20px 16px 18px;
  border: 2.5px solid var(--tinta);
  border-radius: 14px;
  background: #fff;
  color: var(--tinta);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--tinta);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tarjeta-juego::before {
  /* franja de color arriba, como una cinta */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 10px;
  border-radius: 11px 11px 0 0;
  background: var(--color);
  border-bottom: 2.5px solid var(--tinta);
}
.tarjeta-juego:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--tinta); }
.tarjeta-juego:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--tinta); }
.tarjeta-juego h2 { margin: 10px 0 0; font-size: 20px; line-height: 1.1; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
.tarjeta-juego p { margin: 0; color: #4b5160; font-size: 14px; line-height: 1.4; }
.cabeza-juego { display: flex; margin-top: 10px; }
.icono-juego {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border: 2.5px solid var(--tinta);
  border-radius: 12px;
  background: var(--color);
  color: #fff;
  box-shadow: 3px 3px 0 var(--tinta);
}
.icono-juego .menu-icono { width: 32px; height: 32px; stroke-width: 2; }
.pie-juego { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: auto; padding-top: 12px; }
.pie-juego .boton {
  padding: 10px 26px;
  border: 2.5px solid var(--tinta);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--tinta);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .04em;
}
.estado-juego { color: var(--tinta); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
/* Pegatina "Próximamente", un poco torcida */
.pegatina {
  position: absolute;
  top: 22px; right: -8px;
  padding: 5px 10px;
  background: #ffd23f;
  border: 2px solid var(--tinta);
  border-radius: 4px;
  color: var(--tinta);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 var(--tinta);
}
.tarjeta-juego.pronto { background: #f6f6f3; }
.tarjeta-juego.pronto .icono-juego { filter: grayscale(.35); }
.tarjeta-juego.pronto h2 { color: #3b3f4a; }
.tarjeta-juego.pronto .estado-juego { color: #6b7180; }
@media (max-width: 900px) {
  .rejilla-juegos { grid-template-columns: repeat(2, 1fr); }
  .tarjeta-juego { min-height: 270px; }
}
@media (max-width: 420px) {
  .rejilla-juegos { gap: 14px; padding-right: 8px; }
  .tarjeta-juego { min-height: 250px; padding: 18px 12px 14px; }
  .tarjeta-juego h2 { font-size: 16px; }
  .tarjeta-juego p { font-size: 13px; }
  .icono-juego { width: 48px; height: 48px; }
  .icono-juego .menu-icono { width: 26px; height: 26px; }
  .pie-juego .boton { padding: 8px 18px; }
  .pegatina { font-size: 9px; right: -6px; }
}

/* Objetos deportivos flotando por la portada (js/flotantes.js) */
.flotantes { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.flotante {
  position: absolute;
  filter: drop-shadow(0 8px 6px rgba(20, 23, 31, .12));
  animation: flota var(--dur, 8s) ease-in-out var(--retraso, 0s) infinite alternate;
}
.flotante svg { display: block; width: 100%; height: auto; }
.flotante.espejo svg { transform: scaleX(-1); }
@keyframes flota {
  from { transform: translate(0, 0) rotate(calc(var(--giro, 1) * -6deg)); }
  to { transform: translate(calc(var(--giro, 1) * 14px), -22px) rotate(calc(var(--giro, 1) * 6deg)); }
}
/* En móvil no hay huecos libres: se tapaban el logo y los textos */
@media (max-width: 700px) {
  .flotantes { display: none; }
}



.hero-juego { padding-top: 0; }
/* Tarjetas de deporte en la página del ahorcado: icono con el balón pixelado sobre blanco */
.tarjeta-deporte-cartel { min-height: 300px; }
.icono-deporte { background: #fff; }
.icono-deporte .icono-pixel { width: 38px; height: auto; }
.tarjeta-deporte-cartel .pie-juego .boton { color: #16181d; }
.rejilla-deportes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* Tarjeta con imagen de fondo oscura y difuminada (img/<deporte>.svg). */
.tarjeta-deporte {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: clamp(150px, 34vw, 200px);
  padding: 16px 18px;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  background: #eef0f4;
  color: var(--texto);
  box-shadow: var(--sombra);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.tarjeta-deporte::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -2;
  background: center / cover no-repeat;
  filter: blur(3px) saturate(.9);
  opacity: .55;
  transform: scale(1.02);
  transition: transform .4s ease, filter .4s ease;
}
.tarjeta-deporte::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .6) 45%, rgba(255, 255, 255, .05) 100%);
}
.tarjeta-deporte[data-deporte="futbol"]::before { background-image: url("../img/futbol.svg"); }
.tarjeta-deporte[data-deporte="baloncesto"]::before { background-image: url("../img/baloncesto.svg"); }
.tarjeta-deporte[data-deporte="tenis"]::before { background-image: url("../img/tenis.svg"); }
.tarjeta-deporte[data-deporte="motor"]::before { background-image: url("../img/motor.svg"); }
.tarjeta-deporte:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--color) 55%, transparent); }
.tarjeta-deporte:hover::before { transform: scale(1.08); filter: blur(2px) saturate(1); opacity: .7; }
.tarjeta-nombre { font-size: clamp(16px, 4.6vw, 26px); overflow-wrap: anywhere; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.tarjeta-sub { color: var(--suave); font-size: 13px; }
.tarjeta-sub::before {
  content: "";
  display: inline-block;
  width: 18px; height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
  background: var(--color);
}

/* ---------------------------------------------------------------- deporte */
.titulo-deporte { font-size: 30px; margin: 10px 0 16px; font-weight: 900; }
.lista-categorias { display: grid; gap: 12px; }
.tarjeta-categoria {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radio);
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-left: 4px solid var(--color);
  box-shadow: var(--sombra);
}
.tarjeta-categoria h2 { margin: 0; font-size: 19px; }
.tarjeta-categoria p { margin: 2px 0 0; color: var(--suave); font-size: 14px; }
.botones-categoria { display: flex; gap: 8px; flex-wrap: wrap; }
/* Reto del día ya jugado hoy */
.boton.hecho-ganado { background: transparent; border: 2px solid var(--color); color: var(--texto); }
.boton.hecho-perdido { background: transparent; border: 2px solid var(--mal); color: var(--mal); }

/* ---------------------------------------------------------------- juego */
.barra-juego {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.barra-titulo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.barra-titulo span { color: var(--suave); font-size: 13px; }
.cambiar-modo { justify-self: end; color: var(--suave); font-size: 13px; font-weight: 600; }
.cambiar-modo:hover { color: var(--texto); }

/* ---------------------------------------------------------------- elegir modo (partida libre) */
.elegir-modo { text-align: center; padding: 18px 0 8px; }
.antetitulo { color: var(--suave); font-size: 14px; margin: 0 0 4px; }
.elegir-modo h1 { margin: 0 0 22px; font-size: clamp(26px, 6vw, 34px); font-weight: 900; }
.opciones-modo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.opcion-modo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 18px;
  border-radius: var(--radio);
  border: 2px solid var(--borde);
  background: var(--fondo);
  box-shadow: var(--sombra);
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.opcion-modo:hover { transform: translateY(-2px); border-color: var(--color); }
.opcion-modo strong { font-size: 24px; font-weight: 900; }
.opcion-modo span { color: var(--suave); font-size: 14px; }
.opcion-modo.modo-experto { background: #14171f; border-color: #14171f; color: #fff; }
.opcion-modo.modo-experto span { color: #b9c0cd; }
.opcion-modo.modo-experto:hover { border-color: var(--acento); }

.zona-juego {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 14px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 14px;
}
.dibujo { width: 100%; height: auto; }
.dibujo line, .dibujo circle { stroke-width: 4; stroke-linecap: round; fill: none; }
.dibujo .estructura { stroke: #b4bccb; }
.dibujo .parte { stroke: var(--texto); }
.dibujo .parte.recien { animation: aparece .25s ease; }
.dibujo.perdido .parte { stroke: var(--mal); }
.dibujo.ganado .estructura { stroke: color-mix(in srgb, var(--acento) 45%, #b4bccb); }
.dibujo.ganado .parte { stroke: var(--acento); }

.vidas { display: flex; gap: 4px; margin-bottom: 10px; }
.corazon { width: 28px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .15)); }
.corazon.recien { animation: tiembla .45s ease; }

.pistas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pista {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--fondo);
  border: 1px solid var(--borde);
  font-size: 14px;
}
.pista.recien { animation: destello .9s ease; }
.pista span { color: var(--suave); }
.pista strong { text-align: right; }
/* Pista aún no desbloqueada: contenido borroso con un sello encima. */
.pista.bloqueada { position: relative; background: var(--panel-2); border-style: dashed; overflow: hidden; user-select: none; }
.pista.bloqueada .borroso { filter: blur(5px); opacity: .7; }
.pista.bloqueada .sello {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--suave);
}
.candado { width: 13px; height: 13px; fill: var(--suave); stroke: var(--suave); }

.palabra {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin: 22px 0 18px;
}
.grupo { display: flex; gap: 5px; }
.casilla, .signo {
  width: clamp(26px, 7.4vw, 38px);
  height: clamp(36px, 9.5vw, 48px);
  display: grid;
  place-items: center;
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 900;
}
.casilla { border-bottom: 3px solid var(--borde); }
.casilla.vacia { border-bottom-color: var(--suave); }
.casilla.nueva { color: var(--acento); animation: pop .3s ease; }
.casilla.revelada { color: var(--mal); }
.signo { width: auto; color: var(--suave); }
.palabra.fin .casilla { border-bottom-color: var(--color); }

.teclado { display: grid; gap: 7px; user-select: none; }
.fila { display: flex; justify-content: center; gap: 5px; }
.tecla {
  flex: 1;
  max-width: 48px;
  height: 52px;
  border-radius: 9px;
  border: 1px solid var(--borde);
  background: var(--panel-2);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}
.tecla:hover:not(:disabled) { background: #e2e5eb; }
.tecla:active:not(:disabled) { transform: scale(.94); }
.tecla:disabled { cursor: default; }
.tecla.acierto { background: color-mix(in srgb, var(--ok) 16%, #fff); border-color: var(--ok); color: #157a41; }
.tecla.fallo { opacity: .35; background: transparent; }

.resultado {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 20px 16px;
  animation: aparece .35s ease;
}
.resultado h2 { margin: 0 0 4px; font-size: 30px; font-weight: 900; }
.resultado.gana h2 { color: var(--acento); }
.resultado p { margin: 0 0 14px; color: var(--suave); }
.resultado p strong { color: var(--texto); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 16px; }
.dato { display: flex; flex-direction: column; }
.dato strong { font-size: 24px; }
.dato span { color: var(--suave); font-size: 12px; }
.botones-resultado { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.proximo { margin: 14px 0 0 !important; font-size: 14px; }
.reloj { font-variant-numeric: tabular-nums; color: var(--texto); font-weight: 700; }

.cargando, .error { text-align: center; color: var(--suave); padding: 40px 0; }

/* ---------------------------------------------------------------- avisos y diálogo */
.aviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--texto);
  color: var(--fondo);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }

.dialogo {
  max-width: 420px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--panel);
  color: var(--texto);
  padding: 20px 22px;
}
.dialogo { box-shadow: 0 20px 60px rgba(20, 23, 31, .25); }
.dialogo::backdrop { background: rgba(20, 23, 31, .45); }
.dialogo h2 { margin-top: 0; }
.dialogo ol { padding-left: 20px; color: var(--suave); }
.dialogo li { margin-bottom: 6px; }
.dialogo li strong { color: var(--texto); }
.dialogo form { text-align: center; margin-top: 12px; }

/* ---------------------------------------------------------------- animaciones */
@keyframes aparece { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes destello { 0% { opacity: 0; box-shadow: 0 0 0 2px var(--acento); } 40% { opacity: 1; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes tiembla { 0%, 100% { transform: none; } 20% { transform: translateX(-3px) scale(1.15); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } }
@keyframes salta { from { transform: translateY(0); } to { transform: translateY(-6px); } }

@media (max-width: 520px) {
  .zona-juego { grid-template-columns: 96px 1fr; padding: 12px; gap: 10px; }
  .pista { font-size: 13px; padding: 7px 8px; }
  .tecla { height: 48px; font-size: 16px; }
  .fila { gap: 4px; }
  .barra-juego { grid-template-columns: auto 1fr auto; }
  .opciones-modo { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- menú de juegos (cajón lateral) */
/* Fijo en la esquina superior izquierda: siempre a mano aunque bajes */
.cabecera .boton-menu { position: fixed; z-index: 15; left: 16px; top: 12px; box-shadow: 0 2px 10px rgba(20, 23, 31, .08); }
.boton-menu {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  transition: background .15s ease;
}
.boton-menu:hover { background: var(--panel-2); }
.boton-menu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.velo {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(20, 23, 31, .35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.menu-juegos {
  position: fixed;
  z-index: 21;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 82vw);
  padding: 16px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--fondo);
  border-right: 1px solid var(--borde);
  box-shadow: 8px 0 32px rgba(20, 23, 31, .12);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), visibility .28s;
}
.menu-abierto .menu-juegos { transform: none; visibility: visible; }
.menu-abierto .velo { opacity: 1; visibility: visible; }
.menu-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px 12px;
}
.menu-titulo {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--suave);
}
.menu-cerrar {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.menu-cerrar:hover { background: var(--panel); }
.menu-cerrar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--texto);
  font-weight: 700;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}
.menu-item:hover { background: var(--panel); }
.menu-item.activo { background: color-mix(in srgb, var(--acento) 12%, #fff); color: #c85400; }
.menu-item.pronto { color: var(--suave); }
.menu-icono {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-icono .relleno { fill: currentColor; stroke: none; }
.menu-icono rect.relleno { fill-opacity: .3; }
.etiqueta-pronto {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--suave);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.menu-nombre { white-space: nowrap; }

/* ---------------------------------------------------------------- fondo del terreno de juego en la página de cada deporte */
/* Dibujos generados por herramientas/fondos.py */
body.con-fondo::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
  animation: aparece-fondo .4s ease both;
}
body[data-fondo="futbol"] { background: #2e8b47; }
body[data-fondo="baloncesto"] { background: #7a4a28; }
body[data-fondo="tenis"] { background: #3c8a57; }
body[data-fondo="motor"] { background: #3b3e44; }
body[data-fondo="futbol"]::before { background-image: url("../img/fondos/futbol-horizontal.svg?v=2"); }
body[data-fondo="baloncesto"]::before { background-image: url("../img/fondos/baloncesto-horizontal.svg?v=2"); }
body[data-fondo="tenis"]::before { background-image: url("../img/fondos/tenis-horizontal.svg?v=2"); }
body[data-fondo="motor"]::before { background-image: url("../img/fondos/motor-horizontal.svg?v=2"); }
@media (max-aspect-ratio: 1/1) {
  body[data-fondo="futbol"]::before { background-image: url("../img/fondos/futbol-vertical.svg?v=2"); }
  body[data-fondo="baloncesto"]::before { background-image: url("../img/fondos/baloncesto-vertical.svg?v=2"); }
  body[data-fondo="tenis"]::before { background-image: url("../img/fondos/tenis-vertical.svg?v=2"); }
  body[data-fondo="motor"]::before { background-image: url("../img/fondos/motor-vertical.svg?v=2"); }
}
/* Fútbol y baloncesto: el campo entero, más pequeño y empezando por debajo de la cabecera
   para que el logo y "Deportes" queden fuera de las líneas */
body[data-fondo="futbol"]::before, body[data-fondo="baloncesto"]::before {
  padding: 84px 16px 16px;
  background-origin: content-box;
  background-clip: content-box;
  background-size: contain;
  background-position: center top;
}
/* Fútbol y motor: el dibujo empieza por debajo del título, que queda sobre césped liso */
body[data-fondo="futbol"]::before { padding-top: 128px; }
body[data-fondo="motor"] { background: #3f8f4a; }
body[data-fondo="motor"]::before {
  padding-top: 128px;
  background-origin: content-box;
  background-clip: content-box;
  background-position: center top;
}
@keyframes aparece-fondo { from { opacity: 0; } to { opacity: 1; } }
/* Textos sueltos en blanco para que se lean sobre el terreno */

/* Móvil: los dos botones de cada categoría caben en una fila con su icono */
@media (max-width: 420px) {
  .botones-categoria { flex-wrap: nowrap; width: 100%; }
  .botones-categoria .boton { flex: 1 1 0; padding: 10px 8px; font-size: 14px; gap: 6px; white-space: nowrap; }
  .botones-categoria .boton .icono-pixel { width: 20px; margin-left: 0; }
}

/* ---------------------------------------------------------------- grada y marcador (js/grada.js) */
.grada {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 28px;
  overflow: hidden;
}
.grada[hidden] { display: none; }
.grada-dibujo { display: block; width: 100%; height: auto; }
.hincha { transform-box: fill-box; transform-origin: 50% 100%; animation: ola 9s ease-in-out infinite; animation-delay: calc(var(--x, 0) * 3s); }
@keyframes ola {
  0%, 14%, 100% { transform: translateY(0); }
  7% { transform: translateY(-9px); }
}
.marcador {
  --tinta: #16181d;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 8px;
  width: min(560px, calc(100% - 32px));
  margin-bottom: -64px;            /* se apoya sobre la grada */
  padding: 10px;
  background: var(--tinta);
  border: 3px solid var(--tinta);
  border-radius: 14px;
  box-shadow: 5px 5px 0 #ff7a00;
}
/* patas del marcador, clavadas en la grada */
.marcador::before, .marcador::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 14px;
  height: 80px;
  background: #2b2d33;
  border-left: 4px solid #3b3e46;
}
.marcador::before { left: 22%; }
.marcador::after { right: 22%; }
.marcador-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  background: #0b0c0f;
  border-radius: 8px;
  text-align: center;
}
.marcador-etiqueta { color: #ffd23f; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.marcador-valor {
  color: #ff9a33;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255, 122, 0, .45);
}
.marcador-panel.central .marcador-valor { color: #ffffff; text-shadow: 0 0 10px rgba(255, 255, 255, .35); }
.marcador-sub { color: #9aa1ad; font-size: 11px; font-weight: 700; }
@media (max-width: 520px) {
  .marcador { grid-template-columns: 1fr 1.6fr 1fr; gap: 6px; padding: 7px; margin-bottom: -44px; }
  .marcador-valor { font-size: 22px; }
  .marcador-etiqueta { font-size: 9px; letter-spacing: .08em; }
  .marcador-sub { font-size: 9px; }
  .marcador::before, .marcador::after { height: 56px; width: 10px; }
}
.marcador .reloj { color: inherit; font-weight: inherit; }

/* ---------------------------------------------------------------- página de cada deporte: estilo cartel */
.con-fondo .volver, .pagina-cartel .volver {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 2px solid #16181d;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #16181d;
  color: #16181d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.con-fondo .volver:hover, .pagina-cartel .volver:hover { color: #16181d; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #16181d; }
.con-fondo .titulo-deporte {
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  -webkit-text-stroke: 2px #16181d;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #16181d;
}
.con-fondo .lista-categorias { gap: 16px; }
.con-fondo .tarjeta-categoria {
  position: relative;
  padding: 22px 18px 18px;
  background: #fff;
  border: 2.5px solid #16181d;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #16181d;
  overflow: hidden;
}
/* franja de color arriba, como en la portada */
.con-fondo .tarjeta-categoria::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8px;
  background: var(--color);
  border-bottom: 2.5px solid #16181d;
}
.con-fondo .tarjeta-categoria h2 { font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; color: #16181d; }
.con-fondo .tarjeta-categoria p { color: #4b5160; }
/* botones: mismos que "JUGAR" de la portada */
.con-fondo .botones-categoria .boton {
  padding: 9px 16px;
  border: 2.5px solid #16181d;
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 #16181d;
  color: #16181d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: transform .1s ease, box-shadow .1s ease;
}
.con-fondo .botones-categoria .boton:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #16181d; background: #fff; filter: none; }
.con-fondo .botones-categoria .boton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #16181d; }
.con-fondo .botones-categoria .boton-primario, .con-fondo .botones-categoria .boton-primario:hover { background: var(--color); }
/* Reto de hoy ya jugado: fondo suave del color si lo acertaste, rojo si no */
.con-fondo .botones-categoria .boton.hecho-ganado, .con-fondo .botones-categoria .boton.hecho-ganado:hover { background: color-mix(in srgb, var(--color) 22%, #fff); }
.con-fondo .botones-categoria .boton.hecho-perdido, .con-fondo .botones-categoria .boton.hecho-perdido:hover { background: #ffe3e3; color: #b42323; }
@media (max-width: 420px) {
  .con-fondo .botones-categoria .boton { padding: 9px 6px; font-size: 12px; letter-spacing: .02em; }
}

/* ---------------------------------------------------------------- elección de modo y partida: estilo cartel */
.con-fondo .cargando, .con-fondo .error { color: #fff; font-weight: 800; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }

/* Elegir modo */
.con-fondo .antetitulo {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 2px solid #16181d;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #16181d;
  color: #16181d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.con-fondo .elegir-modo h1 {
  color: #fff;
  font-size: clamp(32px, 7vw, 46px);
  text-transform: uppercase;
  letter-spacing: .03em;
  -webkit-text-stroke: 2px #16181d;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #16181d;
}
.con-fondo .opciones-modo { gap: 18px; }
.con-fondo .opcion-modo {
  align-items: center;
  gap: 8px;
  padding: 26px 18px 22px;
  background: #fff;
  border: 2.5px solid #16181d;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #16181d;
  color: #16181d;
  transition: transform .12s ease, box-shadow .12s ease;
}
.con-fondo .opcion-modo:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 #16181d; border-color: #16181d; }
.con-fondo .opcion-modo:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #16181d; }
.con-fondo .opcion-modo strong { font-size: 26px; text-transform: uppercase; letter-spacing: .04em; }
.con-fondo .opcion-modo .desc-modo { color: #4b5160; }
.icono-modo { display: grid; place-items: center; height: 44px; font-size: 36px; line-height: 1; }
.icono-modo .icono-pixel { width: 40px; height: auto; }
.con-fondo .opcion-modo.modo-experto { background: #16181d; color: #fff; box-shadow: 5px 5px 0 #ff7a00; }
.con-fondo .opcion-modo.modo-experto:hover { box-shadow: 8px 8px 0 #ff7a00; }
.con-fondo .opcion-modo.modo-experto .desc-modo { color: #b9c0cd; }

/* Barra de arriba de la partida */
.con-fondo .barra-titulo strong {
  color: #fff;
  font-size: clamp(20px, 4.5vw, 28px);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .03em;
  -webkit-text-stroke: 1.5px #16181d;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 #16181d;
}
.con-fondo .barra-titulo span {
  margin-top: 6px;
  padding: 3px 10px;
  background: #ffd23f;
  border: 2px solid #16181d;
  border-radius: 999px;
  color: #16181d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.con-fondo .barra-juego .volver { justify-self: start; }
.con-fondo .cambiar-modo {
  padding: 6px 12px;
  background: #fff;
  border: 2px solid #16181d;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #16181d;
  color: #16181d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.con-fondo .cambiar-modo:hover { color: #16181d; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #16181d; }

/* Tablero: una tarjeta cartel con todo el juego dentro */
.tablero {
  position: relative;
  padding: 24px 16px 18px;
  background: #fff;
  border: 2.5px solid #16181d;
  border-radius: 16px;
  box-shadow: 6px 6px 0 #16181d;
  overflow: hidden;
}
.tablero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 9px;
  background: var(--color);
  border-bottom: 2.5px solid #16181d;
}
.tablero .zona-juego { background: transparent; border: 0; padding: 0; }

/* Dibujo del ahorcado: poste de madera y muñeco con trazo grueso */
.tablero .dibujo line, .tablero .dibujo circle { stroke-width: 5; }
.tablero .dibujo .estructura { stroke: #8a5a34; stroke-width: 6; }
.tablero .dibujo .parte { stroke: #16181d; }
.tablero .dibujo.ganado .estructura { stroke: #8a5a34; }
.tablero .dibujo.ganado .parte { stroke: #ff7a00; }
.tablero .dibujo.perdido .parte { stroke: #e5484d; }

/* Pistas */
.tablero .pista { border: 2px solid #16181d; border-radius: 9px; background: #fff; }
.tablero .pista span { color: #6b7180; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; align-self: center; }
.tablero .pista strong { color: #16181d; }
.tablero .pista.bloqueada { background: #f1f2f4; border: 2px dashed #9aa1ad; }
.tablero .pista.bloqueada .sello { color: #4b5160; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }

/* Letras: fichas con borde y sombra dura */
.tablero .palabra { gap: 10px 16px; margin: 24px 0 20px; }
.tablero .grupo { gap: 4px; }
.tablero .casilla, .tablero .signo {
  --ancho: clamp(13px, calc((min(100vw, 760px) - 90px) / var(--n, 10) - 4px), 38px);
  width: var(--ancho);
  height: calc(var(--ancho) * 1.25);
  font-size: calc(var(--ancho) * .64);
}
.tablero .signo { width: auto; }
.tablero .casilla {
  border: 2.5px solid #16181d;
  border-radius: 8px;
  background: color-mix(in srgb, var(--color) 18%, #fff);
  box-shadow: 2px 2px 0 #16181d;
  color: #16181d;
}
.tablero .casilla.vacia { background: #f4f4f1; }
.tablero .casilla.nueva { background: color-mix(in srgb, var(--color) 45%, #fff); color: #16181d; }
.tablero .casilla.revelada { background: #ffe3e3; color: #b42323; }
.tablero .palabra.fin .casilla { border-color: #16181d; }

/* Teclado */
.tablero .teclado { gap: 8px; }
.tablero .fila { gap: 6px; }
.tablero .tecla {
  border: 2px solid #16181d;
  border-radius: 9px;
  background: #fff;
  box-shadow: 2px 2px 0 #16181d;
  color: #16181d;
  font-weight: 900;
  transition: transform .08s ease, box-shadow .08s ease;
}
.tablero .tecla:hover:not(:disabled) { background: #fff; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #16181d; }
.tablero .tecla:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 0 0 0 #16181d; }
.tablero .tecla.acierto { background: var(--color); color: #16181d; border-color: #16181d; opacity: 1; }
.tablero .tecla.fallo { background: #d9dce1; color: #8a909b; box-shadow: none; transform: translate(2px, 2px); opacity: 1; text-decoration: line-through; }

/* Resultado */
.tablero .resultado { background: transparent; border: 0; padding: 4px 0 0; }
.tablero .resultado h2 {
  font-size: clamp(34px, 8vw, 48px);
  letter-spacing: .03em;
  color: #ff7a00;
  -webkit-text-stroke: 2px #16181d;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #16181d;
}
.tablero .resultado.pierde h2 { color: #e5484d; }
.tablero .resultado p { color: #4b5160; font-weight: 600; }
.tablero .resultado p strong { color: #16181d; }
/* Estadísticas como un mini marcador */
.tablero .stats { padding: 8px; gap: 6px; background: #16181d; border-radius: 12px; box-shadow: 4px 4px 0 #ff7a00; }
.tablero .dato { padding: 8px 4px; background: #0b0c0f; border-radius: 8px; }
.tablero .dato strong { color: #ff9a33; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 26px; text-shadow: 0 0 10px rgba(255, 122, 0, .45); }
.tablero .dato span { color: #ffd23f; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.tablero .botones-resultado .boton {
  padding: 10px 18px;
  border: 2.5px solid #16181d;
  border-radius: 10px;
  background: #fff;
  box-shadow: 3px 3px 0 #16181d;
  color: #16181d;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: transform .1s ease, box-shadow .1s ease;
}
.tablero .botones-resultado .boton:hover { background: #fff; filter: none; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #16181d; }
.tablero .botones-resultado .boton-primario, .tablero .botones-resultado .boton-primario:hover { background: var(--color); }
.tablero .proximo {
  display: inline-block;
  padding: 6px 14px;
  background: #ffd23f;
  border: 2px solid #16181d;
  border-radius: 999px;
  color: #16181d !important;
  font-weight: 800;
}
.tablero .proximo .reloj { color: #16181d; font-weight: 900; }

@media (max-width: 520px) {
  /* Barra en dos filas: botones arriba, título debajo */
  .con-fondo .barra-juego { grid-template-columns: auto 1fr auto; grid-template-areas: "volver . cambiar" "titulo titulo titulo"; row-gap: 10px; }
  .con-fondo .barra-juego .volver { grid-area: volver; }
  .con-fondo .barra-juego .barra-titulo { grid-area: titulo; }
  .con-fondo .barra-juego > :last-child { grid-area: cambiar; }
  .tablero .casilla { border-width: 2px; border-radius: 6px; box-shadow: 1.5px 1.5px 0 #16181d; }
  .tablero .grupo { gap: 3px; }
  .tablero { padding: 20px 10px 14px; box-shadow: 4px 4px 0 #16181d; }
  .tablero .zona-juego { grid-template-columns: 84px 1fr; gap: 10px; }
  .tablero .tecla { height: 46px; font-size: 16px; }
  .tablero .fila { gap: 4px; }
  .tablero .dato strong { font-size: 20px; }
  .tablero .botones-resultado .boton { font-size: 12px; padding: 9px 12px; }
  .con-fondo .barra-titulo span { font-size: 10px; }
}

/* ---------------------------------------------------------------- menú, ayuda y avisos: estilo cartel */
/* Botones de la cabecera (tres rayas y "?") */
.boton-menu, .boton-icono {
  background: #fff;
  border: 2.5px solid #16181d;
  box-shadow: 3px 3px 0 #16181d;
  color: #16181d;
  transition: transform .1s ease, box-shadow .1s ease;
}
.cabecera .boton-menu { box-shadow: 3px 3px 0 #16181d; }
.boton-menu { border-radius: 10px; }
.boton-icono { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; font-weight: 900; }
.boton-menu:hover, .boton-icono:hover { background: #fff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #16181d; }
.cabecera .boton-menu:hover { box-shadow: 5px 5px 0 #16181d; }
.boton-menu:active, .boton-icono:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #16181d; }
.boton-menu svg { stroke-width: 3; }

/* Cajón de juegos */
.velo { background: rgba(22, 24, 29, .45); }
.menu-juegos {
  padding: 0 16px 24px;
  background: #fff;
  border-right: 3px solid #16181d;
  box-shadow: 6px 0 0 #16181d;
  gap: 10px;
}
.menu-cabecera {
  margin: 0 -16px 10px;
  padding: 14px 16px 12px;
  border-bottom: 3px solid #16181d;
  background: #ff7a00;
}
.menu-titulo {
  color: #fff;
  font-size: 22px;
  letter-spacing: .06em;
  -webkit-text-stroke: 1.5px #16181d;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #16181d;
}
.menu-cerrar {
  width: 36px; height: 36px;
  background: #fff;
  border: 2.5px solid #16181d;
  border-radius: 10px;
  box-shadow: 2px 2px 0 #16181d;
}
.menu-cerrar:hover { background: #fff; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #16181d; }
.menu-cerrar svg { stroke-width: 3; }
.menu-item {
  position: relative;
  padding: 10px 12px;
  border: 2.5px solid #16181d;
  border-radius: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 #16181d;
  color: #16181d;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .1s ease, box-shadow .1s ease;
}
.menu-item:hover { background: #fff; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #16181d; }
.menu-item:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #16181d; }
.menu-item.activo { background: color-mix(in srgb, #ff7a00 18%, #fff); color: #16181d; }
.menu-item.pronto { background: #f6f6f3; color: #3b3f4a; }
/* Icono de cada juego en su cuadrado de color, como en la portada */
.menu-item { --color: #ff7a00; }
.menu-item[data-juego="La sopa de letras"] { --color: #2f6fd6; }
.menu-item[data-juego="El crucigrama"] { --color: #7c4ddb; }
.menu-item[data-juego="El quiz diario"] { --color: #e5484d; }
.menu-item .menu-icono {
  box-sizing: content-box;
  width: 20px; height: 20px;
  padding: 6px;
  border: 2px solid #16181d;
  border-radius: 8px;
  background: var(--color);
  color: #fff;
  stroke-width: 2.2;
}
.menu-item.pronto .menu-icono { filter: grayscale(.35); }
/* "Pronto" como pegatina amarilla torcida */
.menu-item .etiqueta-pronto {
  position: absolute;
  top: -9px; right: -6px;
  padding: 2px 8px;
  background: #ffd23f;
  border: 2px solid #16181d;
  border-radius: 4px;
  color: #16181d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: rotate(5deg);
  box-shadow: 2px 2px 0 #16181d;
}

/* Ventana de ayuda */
.dialogo {
  border: 3px solid #16181d;
  border-radius: 16px;
  box-shadow: 7px 7px 0 #16181d;
  padding-top: 0;
  overflow: hidden;
}
.dialogo h2 {
  margin: 0 -22px 16px;
  padding: 16px 22px 14px;
  background: #ff7a00;
  border-bottom: 3px solid #16181d;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  -webkit-text-stroke: 1.5px #16181d;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 #16181d;
}
.dialogo ol { color: #4b5160; }
.dialogo li strong { color: #16181d; }
.dialogo form .boton {
  padding: 10px 26px;
  border: 2.5px solid #16181d;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #16181d;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: transform .1s ease, box-shadow .1s ease;
}
.dialogo form .boton:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #16181d; filter: none; }

/* Avisos ("llegará muy pronto") */
.aviso {
  background: #ffd23f;
  color: #16181d;
  border: 2.5px solid #16181d;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #16181d;
  font-weight: 900;
  letter-spacing: .02em;
}

/* En la portada aún no has elegido juego: la ayuda (que explica el ahorcado) no tiene sentido */
.es-inicio #boton-ayuda { display: none; }

/* ---------------------------------------------------------------- sopa de letras (js/sopa.js) */
.sopa { --tinta: #16181d; }
.sopa-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sopa-reto, .sopa-tiempo, .sopa-cuenta {
  padding: 5px 12px;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--tinta);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.sopa-reto { background: #ffd23f; }
.sopa-chips { display: flex; gap: 8px; }
.sopa-tiempo { background: #16181d; color: #ff9a33; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.sopa-cuenta { background: #fff; }
.sopa-cuerpo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sopa-tablero { padding: 22px 12px 12px; }

/* Cuadrícula: fichas como las del ahorcado */
.sopa-rejilla {
  display: grid;
  grid-template-columns: repeat(var(--tam), 1fr);
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;          /* que el dedo no mueva la página al arrastrar */
}
.sopa-celda {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid #16181d;
  border-radius: 7px;
  background: #fff;
  box-shadow: 1.5px 1.5px 0 #16181d;
  color: #16181d;
  font-size: clamp(14px, 4.2vw, 21px);
  font-weight: 900;
  cursor: pointer;
  transition: background .12s ease, transform .1s ease;
}
.sopa-celda.hallada { background: color-mix(in srgb, var(--color) 55%, #fff); }
.sopa-celda.revelada { background: color-mix(in srgb, var(--color) 22%, #fff); color: #6b7180; }
.sopa-celda.inicio { background: #ffd23f; }
.sopa-celda.sel { background: #ff9a33; transform: translate(-1px, -1px); box-shadow: 2.5px 2.5px 0 #16181d; }
.sopa-rejilla.error .sopa-celda.sel, .sopa-rejilla.error { animation: tiembla .3s ease; }

/* Pistas */
.sopa-lista { padding: 22px 14px 16px; }
.sopa-titulo-pistas { margin: 0 0 10px; font-size: 18px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.sopa-pistas { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sopa-pista {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 2px solid #16181d;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  line-height: 1.3;
}
.sopa-icono .icono-pixel { width: 22px; height: auto; display: block; }
.sopa-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sopa-pista-texto { color: #2b2f38; }
.sopa-nombre { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.sopa-largo {
  display: grid; place-items: center;
  min-width: 28px; height: 28px; padding: 0 6px;
  border: 2px solid #16181d; border-radius: 8px;
  background: #f4f4f1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 900;
}
.sopa-pista.hallada { background: color-mix(in srgb, var(--color) 20%, #fff); }
.sopa-pista.hallada .sopa-pista-texto { color: #6b7180; text-decoration: line-through; }
.sopa-pista.hallada .sopa-largo { background: var(--color); }
.sopa-pista.fallada { background: #fff1f1; }
.sopa-pista.fallada .sopa-nombre { color: #b42323; }
.sopa-pista.hallada.recien { animation: destello .9s ease; }

.boton-rendirse {
  margin-top: 12px;
  padding: 7px 14px;
  border: 2px solid #16181d;
  border-radius: 9px;
  background: #fff;
  box-shadow: 2px 2px 0 #16181d;
  color: #6b7180;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.boton-rendirse:hover { background: #fff; color: #b42323; }
.sopa-final .resultado { margin-top: 14px; }
.sopa-final .resultado h2 {
  font-size: clamp(30px, 6vw, 40px);
  color: #ff7a00;
  -webkit-text-stroke: 2px #16181d;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 #16181d;
}
.sopa-final .resultado.pierde h2 { color: #e5484d; }
.sopa-final .resultado { background: transparent; border: 0; padding: 0; }
.sopa-final .botones-resultado .boton {
  padding: 10px 18px; border: 2.5px solid #16181d; border-radius: 10px; box-shadow: 3px 3px 0 #16181d;
  background: #2f6fd6; color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase;
}
.sopa-final .proximo {
  display: inline-block; margin-top: 12px; padding: 6px 14px;
  background: #ffd23f; border: 2px solid #16181d; border-radius: 999px; font-weight: 800; color: #16181d;
}
.sopa-final .proximo .reloj { color: #16181d; font-weight: 900; }

@media (max-width: 760px) {
  .sopa-cuerpo { grid-template-columns: 1fr; gap: 16px; }
  .sopa-rejilla { gap: 3px; }
  .sopa-celda { border-radius: 5px; border-width: 1.5px; box-shadow: 1px 1px 0 #16181d; }
}
.boton-rendirse[hidden] { display: none; }

/* Letra que debe ir en minúscula dentro de un título en mayúsculas ("MVPs") */
.minuscula { text-transform: none; }

/* ---------------------------------------------------------------- buzón "Escríbenos" (js/contacto.js) */
.menu-separador { margin: 14px 0 2px 12px !important; color: #6b7180 !important; font-size: 12px !important;
  -webkit-text-stroke: 0 !important; text-shadow: none !important; letter-spacing: .1em; }
.menu-item.menu-contacto { --color: #22b35e; }
.dialogo-contacto { width: min(460px, calc(100vw - 28px)); max-width: none; }
.form-contacto { text-align: left !important; display: grid; gap: 12px; margin-top: 0 !important; }
.tipos-contacto { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.tipos-contacto legend { margin-bottom: 8px; font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.tipo-contacto { cursor: pointer; }
.tipo-contacto input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-contacto span {
  display: inline-block; padding: 7px 12px;
  border: 2px solid #16181d; border-radius: 999px; background: #fff; box-shadow: 2px 2px 0 #16181d;
  font-size: 13px; font-weight: 800; transition: transform .1s ease;
}
.tipo-contacto input:checked + span { background: #ffd23f; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #16181d; }
.tipo-contacto input:focus-visible + span { outline: 3px solid #2f6fd6; outline-offset: 2px; }
.contexto-contacto { margin: 0; padding: 8px 10px; background: #f4f4f1; border: 2px dashed #9aa1ad; border-radius: 8px; font-size: 13px; font-weight: 700; }
.campo-contacto { display: grid; gap: 5px; }
.etiqueta-campo { font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.etiqueta-campo em { font-style: normal; font-weight: 700; color: #6b7180; text-transform: none; letter-spacing: 0; }
.campo-contacto textarea, .campo-contacto input {
  width: 100%; padding: 10px 12px; border: 2px solid #16181d; border-radius: 10px; background: #fff;
  font: inherit; font-size: 15px; color: #16181d; resize: vertical;
}
.campo-contacto textarea:focus, .campo-contacto input:focus { outline: 3px solid #ffd23f; outline-offset: 1px; }
.nota-contacto { margin: -6px 0 0; font-size: 12px; color: #6b7180; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; }
.botones-contacto { display: flex; justify-content: flex-end; gap: 10px; }
.botones-contacto .boton {
  padding: 10px 20px; border: 2.5px solid #16181d; border-radius: 10px; box-shadow: 3px 3px 0 #16181d;
  font-weight: 900; letter-spacing: .05em; text-transform: uppercase; background: #fff;
}
.botones-contacto .boton-primario { background: #ff7a00; }
.botones-contacto .boton:disabled { opacity: .6; }
/* Enlace "¿Algún dato mal?" bajo los resultados */
.enlace-fallo {
  display: block; margin: 14px auto 0; padding: 0; border: 0; background: none;
  color: #6b7180; font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer;
}
.enlace-fallo:hover { color: #16181d; }

/* ---------------------------------------------------------------- privacidad y aviso legal */
.menu-item.menu-legal { --color: #6b7180; }
.legal { max-width: 760px; margin: 0 auto; padding: 26px 22px 22px; --color: #6b7180; }
.legal-seccion + .legal-seccion { margin-top: 18px; padding-top: 16px; border-top: 2px dashed #d5d8de; }
.legal h2 { margin: 0 0 6px; font-size: 18px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.legal p { margin: 0 0 8px; color: #2b2f38; line-height: 1.55; }
.legal a { color: #c85400; font-weight: 700; }
.nota-contacto a { color: #c85400; font-weight: 700; }
.sin-ayuda #boton-ayuda { display: none; }
