:root {
  --accent: #397a5d;
  --accent-dark: #285540;
  --wash: #abd8c3;
  --wrong: #b84f43;
}

.counting-stage {
  width: min(100%, 640px);
}

.object-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: min(36vh, 300px);
  min-height: min(36dvh, 300px);
  padding: 28px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.3)),
    var(--wash);
  box-shadow: var(--shadow);
  place-items: center;
}

.object-card::before,
.object-card::after {
  position: absolute;
  border: 2px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 50%;
  content: "";
}

.object-card::before {
  top: -58px;
  right: -35px;
  width: 140px;
  height: 140px;
}

.object-card::after {
  bottom: -48px;
  left: -38px;
  width: 112px;
  height: 112px;
}

.object-card.is-changing .object {
  animation: object-pop 300ms cubic-bezier(0.2, 0.85, 0.35, 1.2) both;
  animation-delay: calc(var(--object-index) * 32ms);
}

.object-grid {
  z-index: 1;
  display: flex;
  width: min(100%, 520px);
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.4vw, 14px);
}

.object {
  display: grid;
  flex: 0 0 clamp(44px, 13vw, 70px);
  aspect-ratio: 1;
  place-items: center;
  font-size: clamp(2.3rem, 11vw, 4rem);
  line-height: 1;
  filter: drop-shadow(0 5px 6px rgba(32, 48, 41, 0.12));
}

.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: 68px;
  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(1.8rem, 8vw, 2.45rem);
  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 object-pop {
  0% {
    opacity: 0;
    transform: scale(0.58) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@media (min-width: 700px) {
  .object-card {
    min-height: min(40vh, 360px);
    min-height: min(40dvh, 360px);
    padding: 34px;
    border-radius: 42px;
  }

  .answer-options {
    gap: 14px;
  }

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

@media (max-height: 650px) {
  .object-card {
    min-height: 210px;
    padding-block: 18px;
  }

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

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