/* The guide character (TR2): one picture per pose from the kit (data/mascot.json), its sizes, the mirror for right-to-left pages and a gentle float that runs only when the visitor has not asked for less motion. No file is named here (logical properties only). */

.mascot {
  display: block;
  flex: none;
  inline-size: var(--mascot-size, 9rem);
  block-size: auto;
}

.mascot--sm {
  --mascot-size: 5.5rem;
}

.mascot--lg {
  --mascot-size: 12rem;
}

/* A right-to-left page wants the character to face left. The kit's own left-facing drawing is used when it has one, else this mirror of the right-facing picture */
.mascot--flip {
  transform: scaleX(-1);
}

/* A pose beside a heading (the welcome card) */
.mascot-lead {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.mascot-lead > h2 {
  margin: 0;
}

.empty .mascot {
  --mascot-size: 6.5rem;
}

.quest-celebrate .mascot {
  --mascot-size: 5rem;
}

/* Motion is opt-in: nothing moves unless the visitor has not asked for less. The float uses `translate`, not `transform`, so the mirror above survives it. */
@media (prefers-reduced-motion: no-preference) {
  .mascot {
    animation: mascot-float 5s ease-in-out infinite;
  }
}

@keyframes mascot-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -0.4rem;
  }
}
