/* Odd One Out — tap the one that doesn't belong */

.odd-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.odd-status,
.odd-score {
  margin: 0;
  width: min(100%, 480px);
  font-weight: 800;
  color: var(--ink-soft);
  text-align: center;
}

.odd-score {
  color: var(--teal-deep);
}

.odd-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 18px);
  width: min(100%, 420px);
  touch-action: manipulation;
}

.odd-tile {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  min-width: 64px;
  min-height: 64px;
  margin: 0;
  padding: 8px;
  border: 3px solid #0c4f47;
  border-radius: 18px;
  background: linear-gradient(160deg, #34b3a3 0%, #1f8a7e 45%, #14665d 100%);
  box-shadow:
    0 3px 0 #0c4f47,
    0 8px 18px rgba(20, 102, 93, 0.28);
  color: #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: clamp(2.4rem, 14vw, 3.6rem);
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(255, 200, 87, 0.35);
}

.odd-tile:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #0c4f47,
    0 4px 10px rgba(20, 102, 93, 0.22);
}

.odd-tile:focus-visible {
  outline: 3px solid #ffc857;
  outline-offset: 3px;
}

.odd-tile.is-selected {
  transform: translateY(1px);
}

.odd-tile.is-correct {
  background: #f3fff5;
  background-image: none;
  border-color: #2f9e44;
  color: var(--ink);
  box-shadow:
    0 0 0 3px rgba(107, 203, 119, 0.4),
    0 6px 14px rgba(36, 48, 55, 0.1);
}

.odd-tile.is-pop {
  animation: odd-pop 0.45s ease;
}

.odd-tile.is-dim {
  opacity: 0.45;
  filter: saturate(0.55);
}

.odd-tile.is-wrong {
  background: #fff5f3;
  background-image: none;
  border-color: var(--coral);
  color: var(--ink);
  box-shadow:
    0 0 0 3px rgba(255, 107, 74, 0.28),
    0 6px 14px rgba(36, 48, 55, 0.1);
  opacity: 0.72;
  filter: saturate(0.7);
}

.odd-tile.is-shake {
  animation: odd-shake 0.32s ease;
}

@keyframes odd-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@keyframes odd-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.14) rotate(-3deg);
  }
  65% {
    transform: scale(0.96) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

.odd-tile:disabled {
  cursor: default;
  opacity: 0.95;
}

.odd-tile:disabled:not(.is-correct):not(.is-wrong) {
  opacity: 0.75;
  filter: saturate(0.85);
}

.odd-tile.is-dim:disabled {
  opacity: 0.45;
}

.odd-stage.is-dealing {
  pointer-events: none;
}

.odd-stage.is-dealing .odd-tile {
  animation: odd-deal 0.42s ease-out both;
  animation-delay: var(--deal-delay, 0ms);
}

@keyframes odd-deal {
  0% {
    transform: translate3d(0, 12px, 0) scale(0.88);
    opacity: 0.4;
  }
  45% {
    transform: translate3d(-4px, -2px, 0) rotate(-3deg) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .odd-stage.is-dealing .odd-tile,
  .odd-tile.is-shake,
  .odd-tile.is-pop {
    animation: none;
  }
}

@media (pointer: coarse) {
  .odd-tile {
    min-width: 72px;
    min-height: 72px;
  }
}

@media (min-width: 520px) {
  .odd-stage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 560px);
  }
}
