/* ===== ¿Cuál es? (lee la palabra, toca el dibujo) ===== */
.game { flex: 1; display: flex; flex-direction: column; }

.stats { display: flex; gap: 10px; justify-content: center; margin: 4px 0 6px; }
.chip {
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

/* La pista es la PALABRA: pill grande, legible, en una sola línea (encoge en palabras
   largas como HELICÓPTERO para no envolver ni empujar la grilla). */
.clue { text-align: center; margin: 6px 0 2px; }
.word-clue {
  display: inline-block; max-width: 100%;
  background: rgba(255,255,255,0.96); color: var(--ink);
  border-radius: 18px; box-shadow: var(--shadow);
  padding: clamp(8px, 1.6dvh, 16px) clamp(14px, 4vw, 28px);
  font-weight: 800; letter-spacing: 1px; line-height: 1.05;
  font-size: clamp(1.4rem, min(8vw, 5dvh), 2.6rem);
  white-space: nowrap; overflow: hidden; text-overflow: clip;
  animation: pop 0.4s ease;
}
.hint-line {
  text-align: center; color: #fff; font-weight: 800; font-size: 0.92rem;
  text-shadow: 0 2px 0 rgba(0,0,0,0.15); margin: 8px 0 0;
}

/* Grilla 2×2 de dibujos. Celdas cuadradas acotadas por alto (dvh) para que las dos
   filas + palabra + pista entren en pantalla sin scroll (piso 375×667). */
.grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2.5vw, 16px);
  margin: clamp(8px, 2dvh, 16px) auto 6px;
  width: 100%; max-width: 420px;
}
.cell {
  border: none; border-radius: 22px; background: #fff; color: var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
  cursor: pointer; touch-action: manipulation;
  display: grid; place-items: center;
  aspect-ratio: 1 / 1;
  max-height: clamp(96px, 22dvh, 180px);
  font-size: clamp(2.4rem, 12dvh, 4.4rem);
  transition: transform 0.07s ease;
}
.cell:active:not(:disabled) { transform: scale(0.94); }
.cell.pressed { background: #d9ecff; }
.cell.wrong { background: #e9c9d4; opacity: 0.5; animation: shake 0.4s ease; }
.cell.dim { opacity: 0.4; pointer-events: none; }       /* opción anulada por pista */
.cell.correct { background: var(--green); }              /* destello del correcto al ganar */

.message {
  text-align: center; min-height: 24px;
  color: #fff; font-weight: 800; font-size: 1.05rem;
  text-shadow: 0 2px 0 rgba(0,0,0,0.15); margin: 6px 0 2px;
}

.actions { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.actions .btn { padding: 12px 20px; font-size: 0.95rem; }

/* Overlay de festejo (mismo estilo que los otros juegos) */
.overlay {
  position: fixed; inset: 0;
  background: rgba(43, 35, 80, 0.55);
  backdrop-filter: blur(3px);
  display: none; place-items: center; z-index: 50; padding: 24px;
}
.overlay.show { display: grid; }
.celebrate {
  background: #fff; border-radius: 28px; padding: 26px 24px;
  text-align: center; box-shadow: 0 10px 0 rgba(0,0,0,0.18);
  animation: pop 0.35s ease; max-width: 360px; width: 100%;
}
.celebrate .big-emoji { font-size: 4.4rem; }
.celebrate .word {
  font-size: 2rem; font-weight: 800; letter-spacing: 2px;
  color: var(--ink); margin: 6px 0;
}
.celebrate .praise { font-size: 1.3rem; font-weight: 800; color: var(--pink); margin: 0 0 6px; }
.celebrate .btn { width: 100%; font-size: 1.2rem; }

@keyframes pop {
  0% { transform: scale(0.6); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ===== Encaje en la pantalla visible (PWA): sin scroll ===== */
html, body { height: 100dvh; overflow: hidden; }
.app {
  min-height: 0; overflow: auto;
  padding-bottom: max(env(safe-area-inset-bottom), 20px);
}
.game { min-height: 0; }
.topbar { padding: 6px 0; }
.stats { margin: 2px 0 4px; }
.clue { margin: 4px 0 0; }
