/* Web de jugadores (móvil). */
.fondo { position: fixed; inset: 0; z-index: -1; background: url(/web/img/fondo-movil.jpg?v=1) center / cover no-repeat; }
.fondo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 16, 42, 0.55), rgba(20, 16, 42, 0.82) 40%, rgba(20, 16, 42, 0.94)); }
#app { max-width: 520px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
.embebido .cabeza { display: none; }
.cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.logo { height: 44px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--borde); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; max-width: 60%; }
.chip .av { width: 32px; height: 32px; border-width: 2px; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip b { color: var(--amarillo); }

.pantalla { flex: 1; display: flex; flex-direction: column; gap: 14px; animation: entra 0.25s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1 { font-size: 28px; line-height: 1.1; margin: 8px 0 0; font-weight: 800; }
.suave { color: var(--suave); margin: 0; font-size: 17px; line-height: 1.35; }
.codigo { color: var(--amarillo); letter-spacing: 0.08em; }
.etiqueta { margin: 4px 0 -4px; font-weight: 700; color: var(--suave); }
.error { color: #ffb4a6; margin: 0; font-weight: 600; }

.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--suave); }
input.texto, input.adivinar, .campo input {
  font: inherit; font-size: 22px; font-weight: 600; color: var(--tinta); background: var(--crema); border: 3px solid transparent;
  border-radius: 18px; padding: 12px 16px; width: 100%; outline: none;
}
input:focus { border-color: var(--celeste); }

.boton {
  background: linear-gradient(180deg, #ff8466, var(--coral)); color: #fff; font-weight: 800; font-size: 20px; border-radius: 999px;
  padding: 12px 22px; box-shadow: 0 6px 0 #c94a2e, var(--sombra); transition: transform 0.1s, box-shadow 0.1s;
}
.boton:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #c94a2e; }
.boton:disabled { opacity: 0.45; }
.boton.grande { font-size: 24px; padding: 16px; width: 100%; }

.niveles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.niveles button { background: var(--panel); border: 3px solid var(--borde); border-radius: 18px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; }
.niveles b { font-size: 20px; }
.niveles span { font-size: 13px; color: var(--suave); }
.niveles [aria-checked="true"] { border-color: var(--menta); background: rgba(61, 214, 163, 0.18); }

.rejilla { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.rejilla button { padding: 0; border-radius: 50%; border: 3px solid transparent; aspect-ratio: 1; overflow: hidden; }
.rejilla img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.rejilla [aria-checked="true"] { border-color: var(--amarillo); box-shadow: 0 0 0 3px rgba(255, 201, 60, 0.35); transform: scale(1.06); }

.lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lista li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; padding: 6px 14px 6px 6px; }
.lista li.off { opacity: 0.45; }
.lista .n { flex: 1; font-weight: 700; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista .nivel { font-size: 13px; color: var(--suave); }
.lista b { color: var(--amarillo); font-size: 18px; min-width: 48px; text-align: right; }

.barra { display: flex; align-items: center; gap: 10px; }
.tag { display: inline-block; background: var(--juego, var(--coral)); color: var(--tinta); font-weight: 800; border-radius: 999px; padding: 4px 14px; font-size: 16px; align-self: flex-start; }
.barra .suave { flex: 1; font-size: 15px; }


#juego, #resultado, #fin { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.pregunta { font-size: 26px; font-weight: 800; line-height: 1.15; margin: 4px 0; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 16px; }
.opciones { display: flex; flex-direction: column; gap: 10px; }
.op { background: var(--op); color: var(--tinta); font-weight: 800; font-size: 22px; border-radius: 18px; padding: 14px 16px; text-align: center;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; align-items: center; }
.op:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.op:disabled { opacity: 0.4; }
.op small { font-size: 13px; font-weight: 700; }
.listo { margin: auto 0; text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 30px 10px; }
.listo b { font-size: 30px; color: var(--menta); }
.paso { margin: 0; font-weight: 800; color: var(--celeste); font-size: 18px; }
.cat { margin: 0; font-weight: 800; color: var(--menta); font-size: 18px; }

.caras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.caras button { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; padding: 10px 4px; }
.caras span { font-weight: 700; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dibuja */
.dibuja { display: flex; flex-direction: column; gap: 10px; }
.palabra { background: var(--amarillo); color: var(--tinta); font-size: 22px; border-radius: 999px; padding: 6px 18px; align-self: center; font-weight: 600; }
.palabra b { font-weight: 800; text-transform: uppercase; }
.lienzo { width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 18px; touch-action: none; box-shadow: var(--sombra); display: block; }
.lienzo.mini { opacity: 0.95; }
.titulo-chico { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.titulo-chico .av { width: 30px; height: 30px; border-width: 2px; }
.pista { text-align: center; font-size: 26px; letter-spacing: 0.05em; font-weight: 800; margin: 0; color: var(--amarillo); }
.fila-adivinar { display: flex; gap: 8px; }
.fila-adivinar input { flex: 1; }
.acierto { text-align: center; background: rgba(61, 214, 163, 0.2); border: 2px solid var(--menta); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; }
.acierto b { font-size: 28px; color: var(--menta); }
.colores { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.colores button { aspect-ratio: 1; border-radius: 50%; background: var(--c); border: 3px solid rgba(255, 255, 255, 0.25); }
.colores [aria-checked="true"] { border-color: var(--amarillo); transform: scale(1.15); }
.herramientas { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.grosores { display: flex; gap: 6px; background: var(--panel); border-radius: 999px; padding: 4px; }
.grosores button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.grosores i { width: var(--w); height: var(--w); border-radius: 50%; background: var(--crema); display: block; }
.grosores [aria-checked="true"] { background: rgba(255, 201, 60, 0.3); }
.acciones { display: flex; gap: 6px; }
.chico { background: var(--panel); border: 1px solid var(--borde); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px; }
.chico.amarillo { background: var(--amarillo); color: var(--tinta); }

/* Resultado */
.res { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; margin: auto 0; }
.res .tag { align-self: center; }
.ganado { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; }
.ganado b { font-size: 56px; line-height: 1; color: var(--suave); }
.ganado.si b { color: var(--amarillo); }
.extra { font-size: 20px; font-weight: 700; margin: 0; }
.premio { background: linear-gradient(135deg, rgba(255, 201, 60, 0.3), rgba(255, 107, 74, 0.25)); border: 2px solid var(--amarillo); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; }
.premio b { font-size: 24px; }

.aviso { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); background: var(--panel-solido); border: 2px solid var(--borde); border-radius: 999px; padding: 8px 18px; font-weight: 700; z-index: 10; box-shadow: var(--sombra); max-width: 90vw; text-align: center; }
.aviso.bien { border-color: var(--menta); }
.aviso.mal { border-color: var(--coral); }
.aviso-red { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); background: var(--coral); color: #fff; border-radius: 999px; padding: 6px 16px; font-weight: 700; }

.foto-fila { display: flex; align-items: center; gap: 12px; }
.boton-foto { flex: none; display: flex; align-items: center; gap: 8px; background: var(--celeste); color: var(--tinta); font-weight: 800; font-size: 18px; border-radius: 999px; padding: 8px 16px 8px 8px; cursor: pointer; min-height: 48px; }
.boton-foto .av { width: 40px; height: 40px; border-width: 2px; }
.chico-txt { font-size: 14px; }
.centro { align-self: center; cursor: pointer; }
.embebido #app { padding-bottom: 120px; padding-top: 12px; }
