:root {
  --accent: #367a92;
  --accent-dark: #28596a;
  --wash: #afd7e3;
  --wrong: #b84f43;
}

.listening-stage {
  width: min(100%, 620px);
}

.listen-button {
  position: relative;
  display: grid;
  overflow: hidden;
  width: 100%;
  min-height: min(32vh, 270px);
  min-height: min(32dvh, 270px);
  padding: 24px;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3)),
    var(--wash);
  box-shadow: var(--shadow);
  color: var(--accent-dark);
  cursor: pointer;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 160ms ease, border-color 160ms ease;
}

.listen-button:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.listen-button:active {
  transform: scale(0.985);
}

.sound-rings {
  position: relative;
  display: grid;
  width: clamp(120px, 34vw, 160px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  font-size: clamp(3.8rem, 17vw, 6.2rem);
  line-height: 1;
}

.listen-button.is-playing .sound-rings::before,
.listen-button.is-playing .sound-rings::after {
  position: absolute;
  border: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 50%;
  content: "";
  inset: 0;
  animation: sound-pulse 1s ease-out infinite;
}

.listen-button.is-playing .sound-rings::after {
  animation-delay: 350ms;
}

.listen-label {
  align-self: end;
  font-size: 0.83rem;
  font-weight: 800;
}

.feedback {
  min-height: 25px;
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.feedback.is-correct {
  color: var(--accent-dark);
}

.feedback.is-wrong {
  color: var(--wrong);
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.answer-button {
  min-height: 72px;
  border: 2px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(32, 48, 41, 0.07);
  color: var(--ink);
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 900;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.answer-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.answer-button:active {
  transform: scale(0.97);
}

.answer-button.is-correct {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--wash) 58%, white);
  color: var(--accent-dark);
}

.answer-button.is-wrong {
  border-color: var(--wrong);
  animation: gentle-shake 280ms ease;
}

.answer-button:disabled {
  cursor: default;
}

@keyframes sound-pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes gentle-shake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}

@media (min-width: 700px) {
  .listen-button {
    min-height: min(35vh, 320px);
    min-height: min(35dvh, 320px);
    border-radius: 42px;
  }

  .answer-options {
    gap: 14px;
  }

  .answer-button {
    min-height: 86px;
    border-radius: 25px;
  }
}

@media (max-width: 699px) {
  .listening-stage {
    min-height: 0;
    gap: 6px;
  }

  .listen-button {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0 !important;
    padding: 12px;
  }

  .sound-rings {
    width: clamp(84px, 24dvh, 140px);
    font-size: clamp(3rem, 13vw, 5.2rem);
  }

  .feedback {
    flex: 0 0 25px;
    margin-block: 4px;
  }

  .answer-options {
    flex: 0 0 auto;
    margin-top: 0 !important;
  }

  .answer-button {
    min-height: 58px;
  }
}

@media (max-height: 690px) {
  .listen-button {
    min-height: 190px;
  }

  .sound-rings {
    width: 108px;
    font-size: 3.6rem;
  }

  .feedback {
    margin-block: 8px 6px;
  }

  .answer-button {
    min-height: 60px;
  }
}
