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

.comparison-stage {
  width: min(100%, 780px);
}

.comparison-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.group-choice {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  min-height: min(39vh, 340px);
  min-height: min(39dvh, 340px);
  padding: 18px 10px;
  border: 2px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.83), rgba(255, 255, 255, 0.34)),
    var(--wash);
  box-shadow: 0 16px 42px rgba(32, 48, 41, 0.1);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.group-choice::after {
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 110px;
  height: 110px;
  border: 2px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 50%;
  content: "";
}

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

.group-choice:active {
  transform: scale(0.985);
}

.group-choice.is-correct {
  border-color: var(--accent-dark);
  background: color-mix(in srgb, var(--wash) 72%, white);
}

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

.group-choice:disabled {
  cursor: default;
}

.group-grid {
  z-index: 1;
  display: flex;
  width: min(100%, 250px);
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.8vw, 10px);
}

.group-object {
  display: grid;
  flex: 0 0 clamp(30px, 8.1vw, 51px);
  aspect-ratio: 1;
  place-items: center;
  font-size: clamp(1.75rem, 7.7vw, 3rem);
  line-height: 1;
  filter: drop-shadow(0 4px 5px rgba(32, 48, 41, 0.11));
}

.comparison-groups.is-changing .group-object {
  animation: object-pop 280ms cubic-bezier(0.2, 0.85, 0.35, 1.2) both;
  animation-delay: calc(var(--object-index) * 24ms);
}

.or-badge {
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  margin-inline: -2px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(32, 48, 41, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

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

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

@keyframes object-pop {
  0% { opacity: 0; transform: scale(0.58) translateY(7px); }
  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) {
  .comparison-groups {
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 12px;
  }

  .group-choice {
    min-height: min(44vh, 390px);
    min-height: min(44dvh, 390px);
    padding: 28px 18px;
    border-radius: 40px;
  }

  .or-badge {
    width: 48px;
    height: 48px;
    margin-inline: 3px;
  }
}

@media (max-height: 650px) {
  .group-choice {
    min-height: 230px;
  }

  .feedback {
    margin-top: 8px;
  }
}
