/* Reto del descarte (/jugar/reto-descarte/). Todas las clases llevan el prefijo reto-. */
.reto [hidden] { display: none !important; }
.reto { --reto-sombra-ficha: 0 2px 0 #d9d2c1, 0 3px 5px rgba(27, 34, 48, .18); }
.reto img { border-radius: 3px; box-shadow: var(--reto-sombra-ficha); }

/* Cabecera del reto */
.reto-cabeza { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; }
.reto-titulo { margin: 0; font-family: var(--titulos); font-size: 1.3rem; font-weight: 700; line-height: 1.3; color: var(--jade-hondo); }
.reto-num sup { font-size: .55em; line-height: 0; vertical-align: .6em; }
.reto-fecha { font-family: var(--texto); font-size: .92rem; font-weight: 500; color: var(--gris); }
.reto-fecha:not(:empty)::before { content: " · "; color: var(--borde); }
.reto-cuenta, .reto-marcador { margin: 0; font-size: .88rem; color: var(--gris); font-variant-numeric: tabular-nums; }
.reto-estado { margin: 0 0 12px; font-size: .97rem; color: var(--gris); }

/* La mano: 7 × 2 en móvil, 14 en una fila en pantallas anchas */
.reto-mano { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 4px; padding: 14px 10px 10px; background: var(--tapete); border-radius: var(--radio); }
.reto-ficha { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 56px; padding: 8px 0 0; border: 0; border-radius: 4px; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.reto-ficha img { display: block; width: 100%; max-width: 45px; height: auto; box-shadow: 0 2px 0 #d9d2c1, 0 3px 6px rgba(0, 0, 0, .32); transition: transform var(--transicion), box-shadow var(--transicion); }
.reto-ficha:not(:disabled):hover img { transform: translateY(-3px); }
.reto-ficha[aria-pressed="true"] img { transform: translateY(-7px); box-shadow: 0 0 0 3px var(--jade), 0 0 0 5px #fff, 0 8px 12px rgba(0, 0, 0, .35); }
.reto-ficha:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: none; }
.reto-ficha:disabled { cursor: default; }
.reto-ficha::after { content: attr(data-marca); display: block; height: 1em; margin-top: 4px; font-size: .68rem; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #cfe3da; }
.reto-ficha.es-mejor::after { color: #fff; }
.reto-ficha[aria-pressed="true"]::after { margin-top: 0; }
@media (min-width: 640px) {
  .reto-mano { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 5px; padding: 16px 14px 10px; }
  .reto-ficha { flex: 0 1 45px; min-width: 0; }
}

/* Acciones */
.reto-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.reto-acciones:empty { display: none; }
.reto-acciones-pie { margin-top: 18px; }
.reto-acciones .boton-compra { margin: 0; padding: 10px 18px; border: 0; cursor: pointer; }
.reto-aviso { min-height: 1.4em; margin: 8px 0 0; font-size: .9rem; color: var(--jade-hondo); }

/* Resultado */
.reto-resultado:empty { display: none; }
.reto-resultado { margin-top: 18px; }
.reto-resultado:focus { outline: none; box-shadow: none; }
.reto-veredicto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: var(--radio); background: var(--jade-velo); }
.reto-veredicto p { margin: 0; flex: 1 1 220px; font-size: .97rem; }
.reto-sello { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; background: var(--jade); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.reto-veredicto.nivel-bien { background: #FBF3DC; }
.reto-veredicto.nivel-bien .reto-sello { background: #EBD48C; color: #5A4300; }
.reto-veredicto.nivel-regular { background: #FCEEDF; }
.reto-veredicto.nivel-regular .reto-sello { background: #F1C19A; color: #6F3410; }
.reto-veredicto.nivel-lejos { background: #FAE8E6; }
.reto-veredicto.nivel-lejos .reto-sello { background: var(--bermellon); color: #fff; }

.reto-comparacion { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.reto-tarjeta { padding: 14px 16px; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; }
.reto-tarjeta.es-mejor { border-color: var(--jade); box-shadow: inset 0 0 0 1px var(--jade); }
.reto-etiqueta { margin: 0 0 10px; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gris); }
.reto-etiqueta-utiles { margin: 14px 0 8px; }
.reto-pick { display: flex; align-items: center; gap: 14px; }
.reto-pick img { flex: none; width: 45px; }
.reto-pick strong { display: block; font-size: 1.08rem; line-height: 1.3; }
.reto-pick span { display: block; margin-top: 2px; font-size: .92rem; line-height: 1.45; color: var(--gris); }
.reto-utiles { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.reto-util { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; font-size: .8rem; font-weight: 600; color: var(--gris); font-variant-numeric: tabular-nums; }
.reto-util img { width: 32px; }
@media (min-width: 640px) {
  .reto-comparacion { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .reto-comparacion.una { grid-template-columns: minmax(0, 1fr); }
}

/* Ranking completo */
.reto-subtitulo { margin: 20px 0 8px; font-family: var(--titulos); font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.reto-ranking { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.reto-fila { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 10px; border-radius: 6px; font-size: .9rem; }
.reto-fila.es-mejor { background: var(--jade-velo); }
.reto-fila img { width: 30px; }
.reto-fila-cuerpo { min-width: 0; }
.reto-fila-texto { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; line-height: 1.4; }
.reto-fila-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.reto-tag { padding: 1px 8px; border-radius: 999px; background: var(--jade); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.reto-fila:not(.es-mejor) .reto-tag { background: var(--gris); }
.reto-barra { height: 6px; margin-top: 5px; border-radius: 3px; background: rgba(126, 140, 131, .18); overflow: hidden; }
.reto-barra span { display: block; height: 100%; border-radius: 3px; background: var(--jade); opacity: .55; }
.reto-fila.es-mejor .reto-barra span { opacity: 1; }
.reto-fila.mas-lejos { color: var(--gris); }
.reto-fila.mas-lejos .reto-barra span { background: var(--borde); opacity: .45; }
.reto-fila.mas-lejos img { opacity: .8; }
@media (min-width: 640px) {
  .reto-fila { grid-template-columns: 30px minmax(0, 300px) minmax(0, 1fr); gap: 14px; padding: 5px 10px; }
  .reto-fila-cuerpo { display: contents; }
  .reto-barra { margin-top: 0; }
}

.reto-explica { margin: 18px 0 0; font-size: .92rem; line-height: 1.6; color: var(--gris); }
.reto-explica strong { color: var(--tinta); }
.reto-enlace { margin: 8px 0 0; font-size: .95rem; font-weight: 600; }

/* Estadísticas */
.reto-stats { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--borde); }
.reto-stats-titulo { margin: 0 0 10px; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gris); }
.reto-stats-lista { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.reto-stats-lista li { margin: 0; text-align: center; }
.reto-stats-lista strong { display: block; font-family: var(--titulos); font-size: 1.6rem; line-height: 1.1; color: var(--jade-hondo); font-variant-numeric: tabular-nums; }
.reto-stats-lista span { display: block; margin-top: 2px; font-size: .76rem; line-height: 1.3; color: var(--gris); }
.reto-nota { margin: 12px 0 0; font-size: .82rem; line-height: 1.5; color: var(--gris); }

@media (max-width: 420px) {
  .reto { padding: 16px 14px; }
  .reto-titulo { font-size: 1.18rem; }
  .reto-mano { padding: 12px 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .reto-ficha img { transition: none; }
}
