/* ==========================================================================
   Chip Chomp
   ========================================================================== */

.stage {
  background: #061609;
}

/* Flash the stage when a life is lost */
.stage.hit {
  animation: stage-hit 0.4s ease;
}

@keyframes stage-hit {
  0%,
  100% {
    box-shadow: var(--shadow-lg);
  }
  30% {
    box-shadow:
      0 0 0 4px var(--lose),
      var(--shadow-lg);
  }
}

/* Ghosts turn edible — tint the border to match */
.stage.frenzy {
  border-color: var(--frimax-amber);
  box-shadow:
    0 0 32px rgba(245, 166, 35, 0.45),
    var(--shadow-lg);
}

.legend {
  max-width: 456px;
  margin: 26px auto 0;
  padding: 18px 20px;
}

.legend h3 {
  font-size: 1rem;
  color: var(--frimax-amber);
  margin-bottom: 12px;
}

.legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.legend canvas {
  flex: 0 0 auto;
}

.legend b {
  color: var(--text);
}
