.challenge-panel {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 3px solid #111;
  background: #fff;
  box-shadow: 5px 5px 0 #111;
}

.challenge-panel__header h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.05;
}

.challenge-panel__header p:last-child {
  margin-bottom: 0;
}

.challenge-panel__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.challenge-start {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: 3px solid #111;
  background: #ffd400;
  color: #111;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.challenge-start:hover {
  background: #111;
  color: #fff;
}

.challenge-start:disabled {
  cursor: wait;
  opacity: 0.7;
}

.memory-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.memory-stat {
  padding: 0.75rem;
  border: 2px solid #111;
  background: #ffd400;
}

.memory-stat span,
.memory-stat strong {
  display: block;
}

.memory-stat span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.memory-stat strong {
  margin-top: 0.2rem;
  font-size: 1.35rem;
}

.memory-board {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.memory-card {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 3px solid #111;
  background: #ffd400;
  cursor: pointer;
  perspective: 800px;
}

.memory-card:disabled {
  cursor: default;
}

.memory-card__front,
.memory-card__back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transition: transform 250ms ease;
}

.memory-card__front {
  font-size: 2rem;
  font-weight: 900;
  transform: rotateY(0deg);
}

.memory-card__back {
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem;
  background: #fff;
  transform: rotateY(180deg);
}

.memory-card--revealed
  .memory-card__front {
  transform: rotateY(180deg);
}

.memory-card--revealed
  .memory-card__back {
  transform: rotateY(360deg);
}

.memory-card--matched {
  background: #111;
}

.memory-card--matched
  .memory-card__back {
  background: #111;
  color: #ffd400;
}

.memory-card__symbol {
  font-size: clamp(1.5rem, 7vw, 2.5rem);
}

.memory-card__label {
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.memory-message {
  min-height: 1.5rem;
  margin: 0.85rem 0 0;
  font-weight: 700;
}

.challenge-complete {
  text-align: center;
}

.challenge-complete h2 {
  margin: 0;
  font-size: 2rem;
}

.challenge-complete__reward,
.challenge-placeholder {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 3px solid #111;
  background: #111;
  color: #ffd400;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-complete__note {
  margin-bottom: 0;
  font-size: 0.9rem;
}

@media (max-width: 41.99rem) {
  .challenge-panel {
    margin-top: 1rem;
    padding: 0.85rem;
    border-width: 2px;
    box-shadow: 3px 3px 0 #111;
  }

  .challenge-panel__header h2 {
    font-size: 1.4rem;
  }

  .memory-board {
    gap: 0.4rem;
  }

  .memory-card {
    border-width: 2px;
  }

  .memory-card__front {
    font-size: 1.5rem;
  }

  .memory-card__label {
    font-size: 0.55rem;
  }
}