/* Adivina la palabra · motor Adivina (sesión de los motores, 19 oct, tanda 2). Sin ahorcado: la luz se prende. Sin scroll. */
.ad {
  --ad-noche: #1B2A5C; --ad-noche-2: #121c40; --ad-oro: #F5C542; --ad-crema: #fff8e8; --ad-tinta: #2b2140; --ad-bien: #2fa866;
  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(--ad-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;
}
.ad * { box-sizing: border-box; }
.ad button { font-family: inherit; }
.ad [hidden] { display: none !important; }
.ad button:focus-visible { outline: 3px solid var(--ad-oro); outline-offset: 2px; }
.ad-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--ad-noche); border-bottom: 1px solid rgba(245,197,66,.25); min-height: 72px; flex: 0 0 auto; }
.sj-hay-casa .ad-top { padding-left: 80px; }
.ad-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; }
.ad-globo { flex: 1; min-width: 0; background: var(--ad-crema); color: var(--ad-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); }
.ad-globo-txt { font-weight: 800; font-size: clamp(18px, 4.4vw, 24px); line-height: 1.15; }
.ad-globo-sub { font-size: 18px; font-weight: 600; opacity: .85; line-height: 1.2; }
.ad-contador { flex: 0 0 auto; font-weight: 800; color: var(--ad-oro); min-width: 44px; text-align: center; font-size: 18px; }
.ad-cuerpo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
.ad-mesa { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.ad-pista { display: flex; align-items: center; gap: 12px; max-width: 100%; }
.ad-pista-dib { font-size: clamp(64px, 18vmin, 130px); line-height: 1; }
.ad-pista-txt { font-size: clamp(20px, 5vw, 28px); font-weight: 800; text-align: center; background: rgba(255,255,255,.08); border-radius: 16px; padding: 8px 14px; }
.ad-oir { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-size: 26px; cursor: pointer; }
.ad-palabra { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; max-width: 100%; }
.ad-grupo { display: flex; gap: 6px; }
.ad-hueco { width: clamp(34px, 9vw, 58px); height: clamp(46px, 11vw, 70px); border-bottom: 5px solid rgba(255,255,255,.75); display: flex; align-items: flex-end; justify-content: center;
  font-size: clamp(28px, 7.5vw, 50px); font-weight: 800; line-height: 1.1; color: #fff; }
.ad-palabra.larga .ad-hueco { width: clamp(26px, 6.6vw, 46px); font-size: clamp(22px, 5.8vw, 40px); }
.ad-hueco.lleno { border-bottom-color: var(--ad-oro); animation: ad-sale .3s ease; }
.ad-palabra.bien .ad-hueco { color: #b6f5cf; border-bottom-color: var(--ad-bien); }
.ad-luz { position: relative; width: min(340px, 80%); height: 14px; margin-left: 28px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.ad-luz::before { content: '💡'; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-size: 20px; filter: grayscale(1) brightness(.8); }
.ad-luz.prendida::before { filter: none; }
.ad-luz { overflow: visible; }
.ad-luz-in { border-radius: 999px; height: 100%; width: 0; background: linear-gradient(90deg, #ffe38a, var(--ad-oro)); box-shadow: 0 0 14px rgba(245,197,66,.9); transition: width .35s ease; }
.ad-lado { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ad-teclado { display: grid; grid-template-columns: repeat(7, minmax(0, 52px)); gap: 6px; justify-content: center; }
.ad-teclado.pocas { grid-template-columns: repeat(5, minmax(0, 60px)); }
.ad-tecla { height: 52px; border-radius: 14px; border: 0; background: var(--ad-crema); color: var(--ad-tinta); font-size: 24px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.3); min-width: 48px; }
.ad-tecla.esta { background: var(--ad-bien); color: #fff; box-shadow: none; }
.ad-tecla.no { background: rgba(255,255,255,.12); color: rgba(255,255,255,.4); box-shadow: none; }
.ad-tecla:disabled { cursor: default; }
.ad-ayuda { min-height: 52px; min-width: 150px; padding: 4px 16px; 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; }
.ad-ayuda:disabled { opacity: .45; cursor: default; }
.ad-fin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(18,28,64,.82); z-index: 5; }
.ad-fin-caja { background: var(--ad-crema); color: var(--ad-tinta); border-radius: 24px; padding: 22px 26px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.ad-fin-caja h2 { margin: 0 0 4px; font-size: 30px; color: #b07a00; }
.ad-fin-caja p { margin: 0; font-size: 18px; font-weight: 700; }
@keyframes ad-sale { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-hueco.lleno { animation: none; } .ad-luz::before { content: '💡'; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); font-size: 20px; filter: grayscale(1) brightness(.8); }
.ad-luz.prendida::before { filter: none; }
.ad-luz { overflow: visible; }
.ad-luz-in { border-radius: 999px; transition: none; } }
@media (min-width: 900px), (orientation: landscape) and (max-height: 520px) {
  .ad-cuerpo { flex-direction: row; }
  .ad-lado { width: min(46%, 460px); justify-content: center; }
}
@media (min-width: 900px) and (min-height: 620px) {
  .ad-teclado { grid-template-columns: repeat(7, minmax(0, 64px)); gap: 8px; }
  .ad-teclado.pocas { grid-template-columns: repeat(5, minmax(0, 72px)); }
  .ad-tecla { height: 64px; font-size: 28px; }
  .ad-hueco { width: 64px; height: 80px; font-size: 56px; }
  .ad-pista-txt { font-size: 32px; }
  .ad-luz { height: 18px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .ad-top { min-height: 56px; padding: 4px 8px; }
  .ad-globo { min-height: 46px; padding: 3px 10px; }
  .ad-tecla { height: 48px; font-size: 20px; }
  .ad-teclado { gap: 4px; grid-template-columns: repeat(7, minmax(0, 48px)); }
  .ad-teclado.pocas { grid-template-columns: repeat(5, minmax(0, 52px)); }
  .ad-ayuda { min-height: 48px; }
  .ad-pista-dib { font-size: 64px; }
  .ad-mesa { gap: 8px; }
}
