/* =====================================================================
   Cruza la meta (se apoya en estilos.css, base.css y previa.css)
   Jugador izquierdo: azul · Jugador derecho: rosa (siempre con su nombre
   y lado escritos, no solo el color).
   ===================================================================== */
:root { --j1: #0B4AA8; --j2: #A8124E; }   /* texto blanco encima: 8.3:1 y 7.4:1 */
.previa.cruza { --color-juego: #6A2C91; }  /* morado: texto blanco encima 9.6:1 */

/* ---------- Pantalla previa: elegir personaje ---------- */
.eleccion-jugadores { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.eleccion { border: 3px solid var(--borde); border-radius: 16px; padding: .8rem 1rem 1rem; margin: 0; background: var(--papel); min-width: 0; }
.eleccion.lado-izq { border-top: 10px solid var(--j1); }
.eleccion.lado-der { border-top: 10px solid var(--j2); }
.eleccion legend { font-weight: 700; font-size: 1.05rem; padding: 0 .3rem; }
.nombre-jugador { display: grid; gap: .3rem; font-weight: 700; margin-bottom: .75rem; }
.nombre-jugador input { font: inherit; min-height: 44px; padding: .45rem .75rem; border-radius: 10px; border: 3px solid var(--borde);
  background: var(--papel); color: var(--tinta); }
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ficha-personaje { position: relative; cursor: pointer; }
.ficha-personaje input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ficha-personaje span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; height: 100%; padding: .55rem .3rem;
  border-radius: 12px; border: 3px solid var(--borde); background: var(--cielo); text-align: center; font-size: .82rem; font-weight: 700;
  line-height: 1.2; color: var(--tinta); }
.ficha-personaje svg { width: 40px; height: 86px; }
.ficha-personaje input:checked + span { background: var(--papel); outline: 4px solid var(--color-juego); outline-offset: -1px;
  box-shadow: 3px 3px 0 var(--sombra); }
.ficha-personaje input:checked + span::before { content: "✓ Elegido"; font-size: .75rem; color: var(--tinta); }
.ficha-personaje input:focus-visible + span { outline: 3px solid var(--tinta); outline-offset: 3px; box-shadow: 0 0 0 7px var(--foco); }
.ficha-personaje input:disabled + span { opacity: .4; cursor: not-allowed; }
.ganador-figura svg { width: 70px; height: 150px; }
@media (max-width: 640px) { .eleccion-jugadores { grid-template-columns: 1fr; } }

/* ---------- Durante la carrera ---------- */
.marcador-meta { position: absolute; top: 10px; left: 10px; right: 10px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.jugador-meta { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; color: #fff; border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); min-width: 0; }
.jugador-meta.j1 { background: var(--j1); }
.jugador-meta.j2 { background: var(--j2); justify-content: flex-end; text-align: right; }
.jugador-meta .mini { flex: none; display: grid; place-items: center; width: 34px; height: 56px; background: #fff; border-radius: 8px; padding: 2px; }
.jugador-meta .mini svg { width: 100%; height: 100%; }
.datos-jugador { display: grid; min-width: 0; }
.datos-jugador .lado { font-size: 13px; font-weight: 700; opacity: .9; }
.datos-jugador strong { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jugador-meta .pasos { flex: none; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.25);
  border-radius: 10px; padding: 2px 10px; }
.jugador-meta.j1 .pasos { margin-left: auto; }
.jugador-meta.j2 .pasos { margin-right: auto; }
.reloj-meta { background: var(--panel); border: 3px solid #fff; border-radius: 14px; padding: 4px 18px; text-align: center; color: #fff; }
.reloj-meta span { display: block; font-size: 13px; font-weight: 700; }
.reloj-meta strong { font-size: 32px; font-variant-numeric: tabular-nums; }
.reloj-meta.poco strong { color: #FFD43B; }

.objetivo-meta { position: absolute; top: 92px; width: 150px; padding: 8px 10px 10px; text-align: center; border-radius: 16px;
  background: var(--panel); border: 3px solid #fff; color: #fff; }
.objetivo-meta.j1 { left: 12px; border-color: #7FB2FF; }
.objetivo-meta.j2 { right: 12px; border-color: #FF8DB6; }
.objetivo-meta.centro { left: 50%; transform: translateX(-50%); width: 170px; }
.objetivo-meta .indicacion { display: block; font-size: 14px; font-weight: 700; }
.objetivo-meta strong { display: block; font-size: 76px; line-height: 1; color: #FFD43B; }
.objetivo-meta.acerto strong { color: #7CFFB2; }
.barrita { height: 10px; margin-top: 6px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.barrita div { height: 100%; width: 0; background: #7CFFB2; }

.datos-jugador .lado.falta { color: #FFE14A; }
.botones-hud { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
#depuracion { background: rgba(0,0,0,.7); font-family: ui-monospace, monospace; font-size: 15px; }
.boton-chip:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #FFD43B; }
.anuncio { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; max-width: 90vw; padding: 16px 28px;
  border-radius: 20px; border: 4px solid #fff; font-size: clamp(26px, 4.5vw, 48px); font-weight: 800; text-align: center; color: #fff;
  background: rgba(16, 20, 24, .92); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.anuncio.j1 { background: var(--j1); }
.anuncio.j2 { background: var(--j2); }

@media (max-width: 700px) {
  .marcador-meta { grid-template-columns: 1fr 1fr; }
  .reloj-meta { grid-column: 1 / span 2; grid-row: 2; justify-self: center; }
  .jugador-meta .mini { display: none; }
  .objetivo-meta { top: 150px; width: 120px; }
  .objetivo-meta strong { font-size: 54px; }
}

/* Botón «Saltar letra» dentro de cada letrero */
.objetivo-meta .saltar-letra { display: block; width: 100%; margin-top: 8px; min-height: 40px; padding: 6px 8px; font-size: 15px; background: #3A4350; }
