/* Sopa de letras · motor Sopa (sesión de los motores, 19 oct, tanda 2). Mismo aire que Destapar y Hablar. Sin scroll. */
.sp {
  --sp-noche: #1B2A5C; --sp-noche-2: #121c40; --sp-oro: #F5C542; --sp-crema: #fff8e8; --sp-tinta: #2b2140; --sp-mal: #d9534f;
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #26397a 0%, var(--sp-noche-2) 70%); color: #fff;
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.sp * { box-sizing: border-box; }
.sp button { font-family: inherit; }
.sp [hidden] { display: none !important; }
.sp button:focus-visible { outline: 3px solid var(--sp-oro); outline-offset: 2px; }
.sp-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--sp-noche); border-bottom: 1px solid rgba(245,197,66,.25); min-height: 72px; flex: 0 0 auto; }
.sj-hay-casa .sp-top { padding-left: 80px; }
.sp-casa { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 26px; cursor: pointer; }
.sp-globo { flex: 1; min-width: 0; background: var(--sp-crema); color: var(--sp-tinta); border-radius: 18px; padding: 6px 12px; min-height: 56px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.sp-globo-txt { font-weight: 800; font-size: clamp(18px, 4.4vw, 24px); line-height: 1.15; }
.sp-globo-sub { font-size: 18px; font-weight: 600; opacity: .85; line-height: 1.2; }
.sp-contador { flex: 0 0 auto; font-weight: 800; color: var(--sp-oro); min-width: 44px; text-align: center; font-size: 18px; }
.sp-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.sp-mesa { flex: 1; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.sp-grilla { display: grid; gap: 3px; padding: 6px; border-radius: 22px; background: var(--sp-crema); box-shadow: 0 6px 0 rgba(0,0,0,.25); touch-action: none; cursor: pointer; }
.sp-celda { display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--sp-tinta); font-weight: 800; font-size: var(--sp-letra, 22px); line-height: 1; position: relative; }
.sp-celda.hallada { background: var(--sp-color, var(--sp-oro)); }
.sp-celda.sel { background: rgba(27,42,92,.85); color: #fff; }
.sp-celda.no { background: var(--sp-mal); color: #fff; }
.sp-celda.brilla { box-shadow: 0 0 0 3px var(--sp-oro), 0 0 14px 4px rgba(245,197,66,.9); animation: sp-brilla 1s ease-in-out infinite alternate; }
.sp-lado { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.sp-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sp-pal { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18); font-weight: 800; font-size: 18px; letter-spacing: .04em; }
.sp-pal .sp-dib { font-size: 24px; }
.sp-pal.hallada { background: var(--sp-color, var(--sp-oro)); color: var(--sp-tinta); border-color: transparent; }
.sp-pal.hallada .sp-txt { text-decoration: line-through; text-decoration-thickness: 3px; }
.sp-oculta { opacity: .7; letter-spacing: .12em; }
.sp-ayuda { align-self: center; min-height: 52px; min-width: 140px; padding: 6px 18px; border-radius: 18px; border: 2px solid rgba(245,197,66,.6); background: rgba(245,197,66,.15); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
.sp-ayuda:disabled { opacity: .45; cursor: default; }
.sp-fin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(18,28,64,.82); z-index: 5; }
.sp-fin-caja { background: var(--sp-crema); color: var(--sp-tinta); border-radius: 24px; padding: 22px 26px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.sp-fin-caja h2 { margin: 0 0 4px; font-size: 30px; color: #b07a00; }
.sp-fin-caja p { margin: 0; font-size: 18px; font-weight: 700; }
@keyframes sp-brilla { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sp-celda.brilla { animation: none; } }
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .sp-cuerpo { flex-direction: row; }
  .sp-lado { width: min(36%, 360px); justify-content: center; }
  .sp-lista { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .sp-top { min-height: 56px; padding: 4px 8px; }
  .sp-globo { min-height: 46px; padding: 3px 10px; }
  .sp-pal { min-height: 34px; font-size: 18px; padding: 2px 10px; }
  .sp-ayuda { min-height: 48px; }
  .sp-lista { gap: 4px; }
}
