/* Móvil: Juegos por Rondas (motor "escribir, votar y revelar" y El Tasador).
   A una mano (sección 11): la acción de cada fase va en el panel fijo de abajo
   (.pc-acciones de movil.css), botones de 48 px o más y textos en tarjetas claras. */

.jm { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.jm-cuerpo { flex: 1; display: flex; flex-direction: column; gap: 12px; }

.jm-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jm-ronda { font-size: 16px; background: var(--amarillo); transform: rotate(-2deg); }
.jm-cuenta { width: 48px; height: 48px; font-size: 22px; box-shadow: 3px 3px 0 var(--tinta); }
.movil .cuenta {
  display: grid;
  align-items: center; justify-items: center;
  flex: none;
  font-family: var(--titulo);
  font-weight: 800;
  line-height: 1;
  background: var(--papel);
  border: var(--b) solid var(--tinta);
  border-radius: 50%;
}
.movil .cuenta[hidden] { display: none; }
.movil .cuenta[data-urgente] { color: #fff; background: var(--rojo); }
.cuenta__numero { padding-top: 0.12em; }

/* Avatar y nombre */
.quien { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; }
.quien .avatar { font-size: 13px; }
.quien__nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movil .avatar.fuera { opacity: 0.45; filter: grayscale(1); border-style: dashed; }

/* Pregunta */
.jm-pregunta { display: grid; gap: 8px; justify-items: start; padding: 14px 16px 16px; transform: rotate(-0.8deg); }
.jm-pregunta__etiqueta { font-size: 14px; background: var(--fondo); }
.jm-pregunta__texto { font-family: var(--titulo); font-weight: 800; font-size: 22px; line-height: 1.15; }
.jm-pregunta__texto--pequeno { font-family: var(--texto); font-size: 16px; font-weight: 700; }
.jm-pregunta__respuesta { display: grid; gap: 4px; justify-items: start; font-size: 17px; font-weight: 700; }
.jm-pregunta__respuesta .chip { font-size: 13px; background: var(--verde); color: #fff; }
.jm-pregunta .palabra-rara { font-size: 34px; }
.hueco { display: inline-block; min-width: 64px; height: 0.9em; vertical-align: -0.12em; border-bottom: 3px solid currentColor; }
.hueco--lleno { min-width: 0; height: auto; border: 0; vertical-align: baseline; }
.movil .jv-respuesta { display: inline-block; padding: 0 0.25em; color: #fff; background: var(--verde); border: 2px solid var(--tinta); border-radius: 6px; }

/* Estado: enviado, esperando, tu turno */
.jm-estado { padding: 12px 14px; font-size: 17px; font-weight: 700; }
.jm-estado--espera { background: var(--papel-hondo); }
.jm-estado--turno { background: var(--amarillo); }
.jm-estado--hecho { background: var(--papel); }
.jm-enviado { display: flex; align-items: center; gap: 14px; transform: rotate(0.8deg); }
.jm-enviado strong { font-family: var(--titulo); font-size: 22px; }
.jm-enviado__texto { font-size: 18px; overflow-wrap: anywhere; }
.jm-enviado__marca { flex: none; display: grid; align-items: center; justify-items: center; width: 44px; height: 44px; font-size: 24px; font-weight: 800; color: #fff; background: var(--verde); border: var(--b) solid var(--tinta); border-radius: 50%; }
.jm-nota { font-size: 15px; font-weight: 700; color: var(--papel); text-shadow: 1px 1px 0 var(--tinta); }
body[data-claro] .jm-nota { color: var(--tinta); text-shadow: none; }

/* Formulario de escribir o apostar: dentro del panel fijo de abajo */
.jm-formulario { display: grid; gap: 8px; padding: 14px; background: var(--papel); border: var(--b) solid var(--tinta); border-radius: 18px; box-shadow: 4px 4px 0 var(--tinta); }
.jm-formulario label { font-size: 16px; }
.jm-formulario label strong { font-family: var(--titulo); font-size: 20px; }
.jm-campo { min-height: 56px; font-size: 20px; }
.jm-campo--largo { font: inherit; font-size: 20px; font-weight: 700; min-height: 84px; padding: 12px 16px; resize: none; line-height: 1.25; }
.jm-formulario__pie { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; color: var(--gris-texto); }
.jm-contador { flex: none; font-variant-numeric: tabular-nums; }
.jm-contador.cerca { color: var(--rojo); }

/* Botonera de opciones para votar */
.jm-opciones { list-style: none; margin: auto 0 0; padding: 0 0 max(4px, env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.jm-opciones--jugadores { grid-template-columns: 1fr 1fr; }
.jm-opcion {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tinta);
  background: var(--papel);
  border: var(--b) solid var(--tinta);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--tinta);
  transition: transform 0.12s ease;
}
.jm-opcion:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }
.jm-opcion__letra { flex: none; display: grid; align-items: center; justify-items: center; width: 36px; height: 36px; padding-top: 2px; font-family: var(--titulo); font-weight: 800; font-size: 20px; background: var(--fondo); border: 2px solid var(--tinta); border-radius: 50%; }
.jm-opcion__letra:empty { display: none; }
.jm-opcion__texto { min-width: 0; overflow-wrap: anywhere; }
.jm-opciones--jugadores .jm-opcion { justify-content: center; text-align: center; font-family: var(--titulo); font-size: 20px; }
.jm-opcion[aria-pressed='true'] { background: var(--amarillo); transform: rotate(-1deg) scale(1.02); }
.jm-opcion[aria-pressed='true']::after { content: '✓'; margin-left: auto; flex: none; display: grid; align-items: center; justify-items: center; width: 30px; height: 30px; color: #fff; font-weight: 800; background: var(--verde); border: 2px solid var(--tinta); border-radius: 50%; }
.jm-opciones--jugadores .jm-opcion[aria-pressed='true']::after { margin-left: 0; }

/* Resultado de la Ronda */
.jm-resultado { display: grid; gap: 4px; padding: 12px 16px; font-size: 17px; font-weight: 700; transform: rotate(-1deg); }
.jm-resultado__puntos { font-family: var(--titulo); font-size: 34px; line-height: 1; }
.jm-resultado.gana { background: var(--amarillo); }
.jm-resultado.pierde .jm-resultado__puntos { color: var(--rojo); }

.jm-lista { padding: 12px 14px; display: grid; gap: 8px; }
.jm-lista h2 { font-size: 20px; }
.jm-lista > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jm-resumen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jm-resumen li { display: grid; gap: 2px; padding: 6px 10px; border-radius: 10px; background: var(--papel-hondo); }
.jm-resumen li span { font-size: 14px; font-weight: 700; color: var(--gris-texto); }
.jm-resumen li.verdadera, .jm-resumen li.destacada { background: var(--amarillo); border: 2px solid var(--tinta); }
.jm-resumen li.verdadera span, .jm-resumen li.destacada span { color: var(--tinta); }


/* ---------- El Tasador ---------- */

.ta-fila { display: flex; gap: 8px; }
.ta-signo { flex: none; width: 60px; min-height: 68px; font-family: var(--titulo); font-weight: 800; font-size: 28px; background: var(--papel-hondo); border: var(--b) solid var(--tinta); border-radius: 16px; }
.ta-campo { flex: 1; min-width: 0; min-height: 68px; font-family: var(--titulo); font-weight: 800; font-size: 36px; text-align: center; font-variant-numeric: tabular-nums; }
.ta-previa { min-height: 1.4em; font-size: 16px; font-weight: 700; text-align: center; }
.ta-previa.mal { color: var(--rojo); }
.ta-formulario [data-confirmar] { background: var(--verde); color: #fff; }
body[data-claro] .ta-formulario [data-confirmar] { background: var(--verde); color: #fff; }
.ta-mia { font-family: var(--titulo); font-weight: 800; font-size: 32px; line-height: 1; }
.ta-valor-movil { font-family: var(--titulo); font-weight: 800; font-size: 44px; line-height: 1; color: var(--tinta); }

/* Móviles bajitos (360 × 640): compactar */
@media (max-height: 700px) {
  .jm, .jm-cuerpo { gap: 10px; }
  .jm-pregunta { padding: 10px 14px 12px; }
  .jm-pregunta__texto { font-size: 19px; }
  .jm-opcion { min-height: 52px; font-size: 17px; }
  .ta-campo, .ta-signo { min-height: 60px; }
}

/* Fondos claros (El Tasador, El Diccionario): lo que va del color del foco pasa a papel */
body[data-claro] .jm-ronda,
body[data-claro] .jm-pregunta__etiqueta { background: var(--papel); }

/* ---------- Extensiones del motor: mano, juez, uno a uno, fases propias (§12.3) ---------- */

.jm-rol { background: var(--amarillo); transform: rotate(-1deg); }
.jm-disimula { background: var(--noche); color: var(--papel); }
.jm-pasar { width: 100%; }
.jm-sello { margin: 0 0 6px; font-family: var(--titulo); font-weight: 800; font-size: 20px; }
.jm-nota-oscura { font-size: 15px; font-weight: 700; color: var(--gris-texto); }

/* Mano de cartas: una columna de naipes que se tocan */
.jm-mano { list-style: none; margin: auto 0 0; padding: 0 0 max(4px, env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.jm-carta {
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tinta);
  background: var(--papel);
  border: var(--b) solid var(--tinta);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--tinta);
}
.jm-carta:nth-child(odd) { transform: rotate(-0.5deg); }
.jm-carta[aria-pressed='true'] { background: var(--amarillo); transform: rotate(-1deg) scale(1.02); }
.jm-carta[aria-pressed='true'] .jm-carta__texto::before { content: '✓ '; color: var(--verde); }
.jm-carta:disabled { opacity: 0.75; box-shadow: none; }
.jm-carta__texto { overflow-wrap: anywhere; }

/* Dos botones gigantes (verdad o reto) */
.jm-dos { list-style: none; margin: auto 0 0; padding: 0 0 max(4px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jm-gigante { width: 100%; min-height: 150px; font-family: var(--titulo); font-weight: 800; font-size: 26px; color: var(--tinta); background: var(--papel); border: var(--b) solid var(--tinta); border-radius: 20px; box-shadow: 5px 5px 0 var(--tinta); }
.jm-gigante--reto { background: var(--amarillo); }
.jm-gigante__icono { display: block; font-size: 44px; }
.jm-gigante:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }

.jm-propuesta { padding: 16px; font-family: var(--titulo); font-weight: 800; font-size: 22px; line-height: 1.2; transform: rotate(-1deg); }
.jm-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Con tres botones (cumplir, pasar gratis, rechazar): el principal ocupa toda la fila. */
.jm-fila:has(> :nth-child(3)) > :first-child { grid-column: 1 / -1; }

/* El Buzón Oscuro: algunas confesiones son del buzón (#75) */
.jm-aviso { margin: 0; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--tinta); background: var(--amarillo); border: 2px solid var(--tinta); border-radius: 999px; text-align: center; }

/* Pasar sin presión (#76) y juntar burbujas (#79) */
.jm-saltar { width: 100%; }
.jm-opcion.jm-opcion--vetar[aria-pressed='true'] { background: var(--rojo); color: #fff; }
.jm-opcion--vetar[aria-pressed='true']::after { content: '🚫'; background: var(--papel); }
.jm-opcion small { display: block; font-size: 13px; font-weight: 700; color: var(--gris-texto); }
.jm-opcion[aria-pressed='true'] small { color: var(--tinta); }
.jm-resumen li.vetada { opacity: 0.8; }
.jm-resumen li.vetada strong { text-decoration: line-through; }

/* Dificultad (El Mentiroso y El Diccionario): tres botones para el Anfitrión.
   El layout va en .jm-dificultad__caja, no en el <button>. */
.jm-dificultad { padding: 12px 14px; display: grid; gap: 10px; }
.jm-dificultad h2 { font-size: 20px; }
.jm-dificultad__botones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jm-dificultad__boton {
  display: block;
  min-height: 52px;
  padding: 6px 4px 4px;
  font-family: var(--titulo);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
  color: var(--tinta);
  background: var(--papel);
  border: var(--b) solid var(--tinta);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--tinta);
}
.jm-dificultad__boton[aria-pressed='true'] { background: var(--amarillo); transform: rotate(-2deg) scale(1.04); }
.jm-dificultad__caja { display: block; }
.jm-dificultad__ayuda { min-height: 1.3em; font-size: 15px; font-weight: 700; color: var(--gris-texto); }
.jm-dificultad-leer small { font-size: 14px; font-weight: 600; color: var(--gris-texto); }

/* Fondo oscuro (noche): lo que va del color del fondo pasa a amarillo para leerse */
.jv-oscuro .jm-pregunta__etiqueta,
.jv-oscuro .jm-opcion__letra { background: var(--amarillo); }
