/*
 * Kit común de las pantallas de juego (como core/components de la app):
 * GameHeader (.cabecera-juego) · GameStatChip (.chip-dato) · GameCaption (.rotulo) · GameTutorialOverlay (.tutorial)
 * GameResultOverlay (.resultado) · DailyLockedOverlay (.reto-hecho) · OvejaLoadingOverlay (.cargando-juego)
 */
body.juego .pagina { padding-bottom: calc(24px + env(safe-area-inset-bottom)); gap: 10px; }
body.juego .fondo::after { background: rgba(20, 12, 4, .28); }  /* BarnBackdrop(dim = true) */
@media (min-width: 900px) { body.juego .pagina { padding-top: 16px; } }

/* Cabecera del juego */
.cabecera-juego .marca .cinta > span { font-size: 17px; }
.cabecera-juego .lado { min-width: 46px; flex: none; display: flex; justify-content: center; gap: 6px; }

/* Rótulo cartoon centrado (GameCaption) */
.rotulo { text-align: center; margin: 0; font-family: var(--titulos); font-weight: 800; font-size: 20px; line-height: 1.15; color: #fff;
  -webkit-text-stroke: 4px var(--canto); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.rotulo.oro { color: #FFD04A; }
.rotulo.peq { font-size: 16px; -webkit-text-stroke-width: 3px; }

/* Chips de datos (GameStatChip) */
.chips-datos { display: flex; gap: 8px; }
.chip-dato { flex: 1; min-width: 0; text-align: center; padding: 6px 4px; border-radius: 16px; background: var(--tarjeta); border: 2px solid var(--canto); box-shadow: 0 3px 0 var(--canto); margin-bottom: 3px; }
.chip-dato small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-dato b { display: block; font-family: var(--titulos); font-size: 20px; line-height: 1.1; }

/* Aviso corto para visitas de campaña (en vez del tutorial): informativo, NUNCA captura toques */
.aviso-campana { position: fixed; left: 12px; right: 12px; top: calc(140px + env(safe-area-inset-top)); z-index: 130; display: flex; justify-content: center;
  pointer-events: none; animation: sube .45s var(--muelle); transition: opacity .3s, transform .3s; }
.aviso-campana span { max-width: 460px; padding: 12px 18px; border-radius: 18px; background: #3A2410; color: #FFF8E8; text-align: center;
  font: 800 16px/1.3 var(--texto); box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 26px rgba(0, 0, 0, .35); border: 2px solid #FFD23F; }
.aviso-campana.fuera { opacity: 0; transform: translateY(-14px); }

/* Resultado de partida (GameResultOverlay) */
/* Mismo arreglo que .velo: con place-items:center, lo que no cabía se cortaba por arriba sin poder llegar */
.resultado { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; align-items: center; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: #2A1A0E center / cover no-repeat; animation: aparece .25s var(--ease); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.resultado::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.resultado.gana::before { background: rgba(0,0,0,.12); }
.resultado .rayos-premio { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 122, .55) 0 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: gira 16s linear infinite; }
.resultado .caja { position: relative; width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; margin: auto 0; flex: none; animation: sube .5s var(--muelle); }
.resultado .mascota { width: 150px; margin-bottom: -26px; position: relative; z-index: 2; animation: sube .6s var(--muelle); }
.resultado .tarjeta { width: 100%; padding: 42px 20px 18px; display: flex; flex-direction: column; gap: 12px; border-radius: 30px; box-shadow: 0 7px 0 var(--canto), 0 16px 30px rgba(0,0,0,.35); }
.resultado .cinta { position: absolute; top: 104px; left: 50%; transform: translateX(-50%); margin: 0; z-index: 3; white-space: nowrap; }
.resultado .sin-mascota .cinta { top: -20px; }
.resultado .mensaje { text-align: center; margin: 0; font-size: 17px; }
.resultado .premio { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px 6px 6px; border-radius: 999px; background: #FFF0C2; border: 3px solid var(--canto); animation: rebota .6s .25s var(--muelle) both; }
.resultado .premio img { width: 46px; height: 46px; }
.resultado .premio b { font-family: var(--titulos); font-size: 28px; color: #FFCF3F; -webkit-text-stroke: 5px var(--canto); paint-order: stroke fill; }
@keyframes rebota { from { transform: scale(.4); } }

/* Reto de hoy completado (DailyLockedOverlay) */
.reto-hecho { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 10px 18px; background: rgba(42, 26, 14, .62); border-radius: inherit; }
.reto-hecho .caja { position: relative; width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; animation: sube .45s var(--muelle); }
.reto-hecho .mascota { width: 110px; margin-bottom: -52px; position: relative; z-index: 2; animation: respira 3.2s ease-in-out infinite; }
@keyframes respira { 50% { transform: translateY(-6px) scale(1.03); } }
.reto-hecho .tarjeta { width: 100%; padding: 58px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.reto-hecho .tit { font-family: var(--titulos); font-weight: 800; font-size: 22px; line-height: 1.1; color: #FFCF3F; -webkit-text-stroke: 4px var(--canto); paint-order: stroke fill; margin: 0; }
.reto-hecho .dato { display: flex; flex-direction: column; align-items: center; padding: 6px 18px; border-radius: 18px; background: #FFF0C2; border: 3px solid var(--canto); }
.reto-hecho .dato b { font-family: var(--titulos); font-size: 30px; line-height: 1; color: var(--oro); -webkit-text-stroke: 4px var(--canto); paint-order: stroke fill; }
.reto-hecho .dato small { font-weight: 800; }
.reto-hecho .siguiente { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--tinta); color: #FFF4DC; font-weight: 800; font-size: 14px; }
.reto-hecho .siguiente svg { width: 18px; height: 18px; color: var(--oro); }
.reto-hecho .siguiente b { color: var(--oro); font-family: var(--titulos); font-size: 16px; }

/* Cargando (OvejaLoadingOverlay) */
.cargando-juego { position: fixed; inset: 0; z-index: 105; display: grid; place-items: center; background: rgba(42, 26, 14, .45); animation: aparece .2s var(--ease); pointer-events: all; }
.cargando-juego .caja { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cargando-juego img { width: 130px; animation: salta-carga .9s ease-in-out infinite; }
@keyframes salta-carga { 50% { transform: translateY(-14px) rotate(-4deg); } }
.cargando-juego p { margin: 0; }
.reto-hecho .datos { display: flex; gap: 8px; justify-content: center; }
.resultado .mensaje { white-space: pre-line; }

/* Resultado de partida, jugando como invitado: invitación a crear la cuenta */
.resultado .aviso-invitado { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px; padding: 10px 12px; border-radius: 14px;
  background: #FFF4D6; border: 2px solid var(--oro); }
.resultado .aviso-invitado p { margin: 0; font-size: 14px; font-weight: 800; color: var(--tinta); text-align: center; }
