/* =========================================================
   PLAYLIST ANIMALES EN INGLÉS — SÚPERATEJUGANDO
   ========================================================= */

.sja {
  --blue: #075aa8;
  --sky: #20b4e5;
  --yellow: #ffd84d;
  --coral: #ff625d;
  --ink: #172033;
  --text: #31516c;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  box-sizing: border-box;
}

.sja :where(
  section, div, article, aside, header, a, button, img,
  span, strong, small, p, h1, h2, audio, svg
) {
  box-sizing: inherit;
}

.sja :where(button, a) {
  font-family: inherit;
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.sja-hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  min-height: 430px;
  padding: 48px 6%;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, #8fe0ff, #d0f4df 55%, #fff0a8);
  box-shadow: 0 18px 40px rgba(7, 90, 168, .14);
}

.sja-hero__content {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.sja :where(h1, h2) {
  font-family: "Fredoka", system-ui, sans-serif;
}

.sja-hero h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: .9;
}

.sja-hero h1 span {
  display: block;
  color: var(--coral);
}

.sja-hero p {
  max-width: 570px;
  color: var(--text);
  font-weight: 700;
}

.sja-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sja-tags span {
  padding: 8px 13px;
  border-radius: 13px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

/* Chop y burbuja */

.sja-chop-wrap {
  position: relative;
  align-self: end;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.sja-chop {
  display: block;
  width: min(100%, 455px);
  max-height: 470px;
  margin: auto auto -48px;
  object-fit: contain;
  filter: drop-shadow(0 13px 9px rgba(0, 0, 0, .13));
}

.sja-chop-bubble {
  position: absolute;
  z-index: 3;
  top: 45px;
  left: -55px;
  max-width: 190px;
  padding: 13px 18px;
  border: 3px solid #fff;
  border-radius: 21px 21px 5px 21px;
  background: #fff;
  color: var(--blue);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 9px 20px rgba(7, 90, 168, .16);
  transform: rotate(-2deg);
}

.sja-chop-bubble::after {
  content: "";
  position: absolute;
  right: -15px;
  bottom: 7px;
  width: 23px;
  height: 23px;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: rotate(8deg);
}

/* CTA de materiales del encabezado */

.sja-material-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 14px;
  margin-top: 17px;
}

.sja-material-link > span {
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
}

.sja-material-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 19px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff625d, #ff8655);
  color: #fff !important;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 6px 0 #d94d49, 0 11px 20px rgba(217, 77, 73, .22);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.sja-material-link a:hover {
  background: linear-gradient(135deg, #ff716b, #ff995f);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #d94d49, 0 14px 24px rgba(217, 77, 73, .27);
}

.sja-material-link a:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #d94d49, 0 6px 12px rgba(217, 77, 73, .2);
}

.sja-material-link a:focus-visible,
.sja-finish__button:focus-visible {
  outline: 4px solid rgba(255, 216, 77, .85);
  outline-offset: 4px;
}

.sja-cta-arrow,
.sja-finish__arrow {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--yellow);
  color: #a84432;
  box-shadow: inset 0 -2px 0 rgba(160, 95, 20, .15);
  transition: transform .18s ease, background-color .18s ease;
}

.sja :where(.sja-cta-arrow, .sja-finish__arrow) svg {
  display: block;
  width: 19px;
  height: 19px;
  overflow: visible;
}

.sja :where(.sja-cta-arrow, .sja-finish__arrow) path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sja-material-link a:hover .sja-cta-arrow,
.sja-finish__button:hover .sja-finish__arrow {
  background: #ffe477;
  transform: translateX(3px) rotate(-4deg);
}

/* =========================================================
   INTRODUCCIÓN Y REPRODUCTOR
   ========================================================= */

.sja-intro {
  padding: 40px 15px 20px;
  text-align: center;
}

.sja-intro h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3rem);
}

.sja-player {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin: 10px 0 34px;
  padding: 16px 22px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: linear-gradient(100deg, #075aa8, #168fc9);
  color: #fff;
  box-shadow: 0 13px 26px rgba(7, 90, 168, .24);
}

.sja-player button {
  border: 0;
  cursor: pointer;
}

.sja-main {
  width: 64px;
  height: 64px;
  border-radius: 21px;
  background: var(--yellow);
  color: #173c60;
  font-size: 1.4rem;
  box-shadow: 0 6px 0 #d9ad23;
}

.sja-player small {
  color: #bceaff;
  font-weight: 900;
  text-transform: uppercase;
}

.sja-player strong {
  display: block;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.8rem;
}

.sja-nav button {
  width: 44px;
  height: 44px;
  margin: 3px;
  border: 2px solid rgba(255, 255, 255, .33);
  border-radius: 14px;
  background: rgba(255, 255, 255, .11);
  color: #fff;
}

/* =========================================================
   BLOQUES Y TARJETAS
   ========================================================= */

.sja-block {
  margin-bottom: 30px;
  padding: 30px;
  border-radius: 30px;
}

.sja-block.b1 { background: #e6f7ff; }
.sja-block.b2 { background: #e8f8ef; }
.sja-block.b3 { background: #fff2df; }
.sja-block.b4 { background: #f0ebff; }

.sja-block header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sja-block header > b {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #fff;
  border-radius: 18px;
  background: #20b4e5;
  color: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.5rem;
}

.sja-block.b2 header > b { background: #43c58a; }
.sja-block.b3 header > b { background: #ff9f43; }
.sja-block.b4 header > b { background: #8c70db; }

.sja-block :where(h2, p) {
  margin: 0;
}

.sja-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
}

.sja-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: #fff9d9;
  text-align: center;
  box-shadow: 0 7px 0 rgba(77, 108, 135, .09);
  transition: transform .18s ease, outline-color .18s ease;
}

.sja-card:nth-child(4n + 2) { background: #e8f8ff; }
.sja-card:nth-child(4n + 3) { background: #fff0ed; }
.sja-card:nth-child(4n + 4) { background: #edfaef; }

.sja-card:hover,
.sja-card.is-active {
  outline: 4px solid var(--yellow);
  transform: translateY(-4px);
}

.sja-pic {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
}

.sja-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sja-image-fallback,
.sja-pic > span {
  display: none;
  place-items: center;
  font-size: 3rem;
}

.sja-card strong {
  color: var(--blue);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1rem;
}

.sja-card small {
  margin: 2px 0 8px;
}

.sja-card button {
  width: 100%;
  padding: 8px 5px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #06437c;
}

.sja-card.is-playing button {
  background: #ff7168;
  box-shadow: 0 4px 0 #d84e49;
}

.sja-error {
  padding: 20px;
  border-radius: 15px;
  background: #ffe9e7;
  color: #a32727;
  text-align: center;
}

/* =========================================================
   RETO DE LUNA
   ========================================================= */

.sja-luna-guide {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 270px;
  margin: 38px 0;
  padding: 28px 60px 24px 38px;
  overflow: hidden;
  border: 3px dashed #ff91ad;
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .5) 0 8px, transparent 9px),
    radial-gradient(circle at 88% 78%, rgba(255, 255, 255, .44) 0 11px, transparent 12px),
    linear-gradient(120deg, #ffe0eb, #fff0f4 53%, #ffe6dc);
  box-shadow: 0 13px 28px rgba(210, 91, 125, .13);
}

.sja-luna-guide__image {
  display: flex;
  align-self: end;
  align-items: flex-end;
  justify-content: center;
  height: 235px;
  overflow: visible;
}

.sja-luna-guide__image img {
  display: block;
  width: 270px;
  max-width: none;
  max-height: 255px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 8px rgba(89, 46, 28, .14));
}

.sja-luna-guide__content {
  align-self: center;
  width: 100%;
  max-width: 720px;
  min-width: 0;
}

.sja-luna-guide__label {
  display: inline-block;
  margin-bottom: 11px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffcf59;
  color: #754b15;
  font-size: 1.4rem;
  font-weight: 900;
  transform: rotate(-2deg);
}

.sja-luna-guide h2 {
  margin: 0;
  color: #df5876;
  font-size: clamp(2.25rem, 3.3vw, 3.2rem);
  line-height: 1;
}

.sja-luna-guide p {
  margin: 12px 0 20px;
  color: #684424;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.sja-luna-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
}

.sja-luna-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding: 11px 18px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 5px 10px rgba(167, 67, 103, .12), inset 0 -2px 0 rgba(0, 0, 0, .05);
}

.sja-luna-steps span:nth-child(1) { background: #dff3ff; transform: rotate(-2deg); }
.sja-luna-steps span:nth-child(2) { background: #e8ddff; transform: rotate(2deg); }
.sja-luna-steps span:nth-child(3) { background: #fff0c9; transform: rotate(-1deg); }
.sja-luna-steps span:nth-child(4) { background: #dff5df; transform: rotate(2deg); }

.sja-luna-steps b {
  line-height: 1;
}

/* =========================================================
   CIERRE CON MISS ANA
   ========================================================= */

.sja-finish {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 28px;
  min-height: 340px;
  margin: 42px 0 24px;
  padding: 38px 25px 38px 7%;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 32px;
  background: linear-gradient(120deg, #075aa8, #168fc9);
  color: #fff;
  box-shadow: 0 16px 32px rgba(7, 90, 168, .22);
}

.sja-finish__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  min-width: 0;
}

.sja-finish__label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  color: #d8f4ff;
  font-weight: 900;
}

.sja-finish h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1;
}

.sja-finish p {
  max-width: 680px;
  margin: 13px 0 22px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
}

.sja-finish__button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 11px 13px 11px 20px;
  border-radius: 17px;
  background: linear-gradient(135deg, #ff625d, #ff8655);
  color: #fff !important;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 6px 0 #bd3f43, 0 12px 20px rgba(0, 0, 0, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}

.sja-finish__button:hover {
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #bd3f43, 0 16px 25px rgba(0, 0, 0, .22);
}

.sja-finish__button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #bd3f43, 0 7px 12px rgba(0, 0, 0, .18);
}

.sja-finish__character {
  position: relative;
  z-index: 2;
  display: flex;
  align-self: stretch;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.sja-finish__character img {
  display: block;
  width: 355px;
  max-width: none;
  height: auto;
  max-height: 330px;
  margin-bottom: -38px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 13px 10px rgba(0, 0, 0, .18));
}

.sja-finish__paw,
.sja-finish__star {
  position: absolute;
  color: #fff;
  opacity: .11;
  pointer-events: none;
}

.sja-finish__paw {
  font-size: 5rem;
}

.sja-finish__paw.paw-one {
  top: 15px;
  right: 4%;
  transform: rotate(18deg);
}

.sja-finish__paw.paw-two {
  right: 22%;
  bottom: -22px;
  transform: rotate(-15deg);
}

.sja-finish__star {
  top: 24px;
  left: 30%;
  font-size: 2.4rem;
  transform: rotate(15deg);
}

.sja-final-message {
  margin: 0 15px 45px;
  color: var(--blue);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 1.45rem;
  text-align: center;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 950px) {
  .sja-hero {
    grid-template-columns: 1.2fr .8fr;
  }

  .sja-chop {
    width: min(100%, 390px);
    max-height: none;
  }

  .sja-chop-bubble {
    top: 45px;
    left: -25px;
    max-width: 160px;
    padding: 11px 14px;
    font-size: .92rem;
  }

  .sja-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sja-luna-guide {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 30px;
    padding-inline: 28px;
  }

  .sja-finish {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .sja-finish__character img {
    width: 305px;
  }
}

/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 650px) {
  .sja-hero {
    grid-template-columns: 1fr;
    padding: 28px 20px 0;
    text-align: center;
  }

  .sja-tags,
  .sja-material-link {
    justify-content: center;
  }

  .sja-material-link {
    margin: 16px auto 0;
  }

  .sja-material-link > span {
    display: block;
    width: 100%;
    font-size: .84rem;
    text-align: center;
  }

  .sja-material-link a {
    flex: 0 0 220px;
    width: 220px;
    max-width: 100%;
    padding: 11px 15px;
    font-size: .86rem;
  }

  .sja-chop-wrap {
    margin-top: 10px;
  }

  .sja-chop {
    width: 230px;
    max-height: none;
    margin: 10px auto -25px;
  }

  .sja-chop-bubble {
    top: 24px;
    left: calc(50% - 180px);
    max-width: 155px;
    padding: 9px 12px;
    border-width: 2px;
    border-radius: 17px 17px 4px 17px;
    font-size: .82rem;
    transform: rotate(-3deg);
  }

  .sja-chop-bubble::after {
    right: -12px;
    width: 18px;
    height: 18px;
  }

  .sja-player {
    grid-template-columns: 54px 1fr;
    padding: 11px;
  }

  .sja-main {
    width: 54px;
    height: 54px;
  }

  .sja-nav {
    display: none;
  }

  .sja-block {
    padding: 18px 11px 23px;
  }

  .sja-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  /* Luna: título arriba; personaje a la izquierda y stickers a la derecha */

  .sja-luna-guide {
    grid-template-columns: 48% 52%;
    grid-template-areas:
      "label label"
      "title title"
      "text text"
      "luna steps";
    column-gap: 0;
    row-gap: 7px;
    min-height: 325px;
    margin: 26px 0;
    padding: 20px 12px 10px;
    border-width: 2px;
    border-radius: 24px;
    background:
      radial-gradient(circle at 8% 18%, rgba(255, 255, 255, .5) 0 6px, transparent 7px),
      radial-gradient(circle at 91% 82%, rgba(255, 255, 255, .44) 0 9px, transparent 10px),
      linear-gradient(145deg, #ffdce8, #fff0f5 55%, #ffe3dd);
    text-align: center;
  }

  .sja-luna-guide__content {
    display: contents;
  }

  .sja-luna-guide__label {
    grid-area: label;
    justify-self: center;
    margin: 0 0 4px;
    padding: 6px 11px;
    font-size: 1.12rem;
  }

  .sja-luna-guide h2 {
    grid-area: title;
    font-size: 1.45rem;
    line-height: 1.05;
  }

  .sja-luna-guide p {
    grid-area: text;
    max-width: 255px;
    margin: 2px auto 6px;
    font-size: .82rem;
    line-height: 1.35;
  }

  .sja-luna-guide__image {
    grid-area: luna;
    align-self: end;
    height: 205px;
    margin-bottom: -12px;
  }

  .sja-luna-guide__image img {
    width: 190px;
    max-width: none;
    max-height: 205px;
    object-position: center bottom;
    transform: scale(1.12);
    transform-origin: center bottom;
  }

  .sja-luna-steps {
    grid-area: steps;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 11px;
    padding-left: 3px;
  }

  .sja-luna-steps span {
    width: auto;
    padding: 9px 14px;
    border-width: 2px;
    font-size: .86rem;
  }

  .sja-luna-steps span:nth-child(1) { margin-left: 0; transform: rotate(-3deg); }
  .sja-luna-steps span:nth-child(2) { margin-left: 17px; transform: rotate(2deg); }
  .sja-luna-steps span:nth-child(3) { margin-left: 3px; transform: rotate(-2deg); }
  .sja-luna-steps span:nth-child(4) { margin-left: 14px; transform: rotate(3deg); }

  /* Cierre */

  .sja-finish {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    margin-top: 30px;
    padding: 27px 18px 0;
    border-radius: 26px;
    text-align: center;
  }

  .sja-finish__content {
    max-width: 100%;
  }

  .sja-finish h2 {
    font-size: 2.2rem;
  }

  .sja-finish p {
    margin: 11px auto 20px;
    font-size: .9rem;
  }

  .sja-finish__button {
    justify-content: center;
    width: 100%;
    max-width: 285px;
    margin: auto;
    padding-left: 15px;
    font-size: .86rem;
    text-align: left;
  }

  .sja-finish__character {
    height: 220px;
    margin-top: 8px;
  }

  .sja-finish__character img {
    width: 250px;
    max-height: 245px;
    margin-bottom: -25px;
  }

  .sja-final-message {
    margin-bottom: 35px;
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sja :where(a, button, article, span, img) {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}