/* Pantalla de carga de Sistema Maestro IA ("Despertando…")
   Todo es propio: SVG + CSS. Sin imágenes externas ni GIF ajenos. */

.smia-wake {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: #000;
  -webkit-tap-highlight-color: transparent;
}

.smia-wake.is-on {
  display: grid;
  animation: smia-wake-in 220ms ease-out both;
}

.smia-wake__card {
  text-align: center;
  padding: 24px;
  width: min(92vw, 420px);
}

.smia-wake__art {
  display: block;
  width: min(56vw, 240px);
  height: auto;
  margin: 0 auto 18px;
}

/* leve balanceo de la cabeza */
#smiaMascota #mascota {
  transform-origin: 160px 214px;
  animation: smia-balanceo 5s ease-in-out infinite;
}

@keyframes smia-balanceo {
  0%, 100% { transform: rotate(-1.7deg); }
  50%      { transform: rotate(1.7deg); }
}

/* humo blanco en bucle (si no hay animación, queda un humo tenue visible) */
#smiaMascota .puff {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.32;
  animation: smia-humo 4.6s ease-out infinite;
  will-change: transform, opacity;
}

#smiaMascota .p1 { animation-delay: 0.9s; }
#smiaMascota .p2 { animation-delay: 1.8s; }
#smiaMascota .p3 { animation-delay: 2.7s; }
#smiaMascota .p4 { animation-delay: 3.6s; }

@keyframes smia-humo {
  0%   { opacity: 0;    transform: translate(0, 0) scale(0.35); }
  12%  { opacity: 0.55; }
  60%  { opacity: 0.30; }
  100% { opacity: 0;    transform: translate(var(--dx, 26px), -126px) scale(1.9); }
}

/* brasa del puro */
#smiaMascota .brasa {
  animation: smia-brasa 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes smia-brasa {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* textos */
.smia-wake__linea {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 5vw, 29px);
  color: #f3ead6;
  letter-spacing: 0.01em;
}

.smia-wake__pct {
  font-family: Georgia, "Times New Roman", serif;
  color: #e8c87a;
  font-variant-numeric: tabular-nums;
}

.smia-wake__msg {
  margin: 10px 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #98a1ac;
}

.smia-wake__retry {
  margin-top: 18px;
  padding: 10px 18px;
  border: 1px solid #e8c87a66;
  border-radius: 999px;
  background: #14100a;
  color: #f0d9a4;
  font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  display: none;
}

.smia-wake__retry.is-on { display: inline-block; }

.smia-wake__retry:hover { background: #1d170d; }

body.smia-wake-open { overflow: hidden; }

@keyframes smia-wake-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #smiaMascota #mascota { animation: none; }
  #smiaMascota .puff { animation: none; opacity: 0.25; }
  #smiaMascota .brasa { animation: none; }
  .smia-wake.is-on { animation: none; }
}
