.game-card {
  position: relative;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.start-groups {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.25rem 0;
  user-select: none;
}

.start-group {
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  line-height: 1;
}

.start-symbol {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  color: var(--color-mango-deep);
  line-height: 1;
  user-select: none;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text-muted);
}

.question-text {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.add-groups {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.35rem 0.45rem;
  align-items: center;
}

.add-symbol {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  min-width: 2.25rem;
  text-align: center;
  color: var(--color-mango-deep);
  user-select: none;
  padding: 0.15rem 0;
}

.add-symbol.is-revealed {
  color: var(--color-grove-deep);
  animation: symbol-pop 0.35s ease;
}

.group-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(31, 138, 91, 0.16);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 0 rgba(31, 138, 91, 0.08);
}

.group-pile {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 0.2rem;
  min-height: clamp(4.5rem, 18vw, 5.5rem);
  max-width: 100%;
}

.group-pile.is-empty {
  min-height: clamp(3.5rem, 14vw, 4.5rem);
}

.group-emoji {
  font-size: clamp(1.65rem, 7vw, 2.1rem);
  line-height: 1;
  user-select: none;
}

.group-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
}

.btn-num-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.75rem;
  margin-bottom: 0;
  padding: 0.45rem 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
}

.btn-num-answer.is-correct {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}

.btn-num-answer.is-wrong {
  border-color: #e67e22;
  background: var(--color-warn-bg);
}

.feedback {
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
}

.feedback-correct {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.feedback-wrong {
  background: var(--color-warn-bg);
  color: #d68910;
}

.final-score {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0.5rem 0 1rem;
}

@keyframes symbol-pop {
  0% {
    transform: scale(0.75);
    opacity: 0.5;
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pile-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.group-panel.pulse {
  animation: pile-pulse 0.5s ease;
}

.shake {
  animation: shake 0.45s ease;
}

@media (max-width: 380px) {
  .answer-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .btn-num-answer {
    min-height: 3.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shake,
  .group-panel.pulse,
  .add-symbol.is-revealed {
    animation: none;
  }
}
