/* Shared mascot stage. Themes set --mascot-size and --mascot-track-height. */

.mascot-stage {
  position: relative;
}

.mascot-track {
  position: relative;
  height: var(--mascot-track-height, 56px);
  overflow: visible;
}

.mascot {
  --mascot-size: 48px;
  box-sizing: border-box;
  width: var(--mascot-size);
  height: var(--mascot-size);
  padding: 0;
  border: 0;
  margin: 0;
  background-color: transparent;
  background-image: url("mascot/sprite.png");
  background-image: -webkit-image-set(
    url("mascot/sprite.png") 1x,
    url("mascot/sprite@2x.png") 2x
  );
  background-image: image-set(
    url("mascot/sprite.png") 1x,
    url("mascot/sprite@2x.png") 2x
  );
  background-repeat: no-repeat;
  background-position: 0 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
  position: absolute;
  left: 0;
  bottom: 0;
  transform-origin: center bottom;
  z-index: 2;
}

.mascot:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.mascot-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mascot-arm {
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 0.15rem 0.5rem;
  cursor: pointer;
}

.mascot-arm:focus-visible,
.mascot-arm:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.mascot-help {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.7;
}

.mascot-hud {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.mascot-hud[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mascot {
    transition: none;
  }
}
