/* Booth Match — retro diner theme */

.booth-theme {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 245, 0.96)),
    repeating-conic-gradient(#1a1a1a 0% 25%, #f5f0ea 0% 50%) 0 0 / 28px 28px;
  border-color: #c41e3a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 3px rgba(196, 30, 58, 0.12);
}

.booth-sign {
  text-align: center;
  margin-bottom: var(--space-3);
}

.booth-sign__glow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  color: #c41e3a;
  padding: 0.35rem 0.9rem;
  border: 2px solid #c41e3a;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 3px rgba(255, 60, 100, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bm-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.45rem, 1.8vw, 0.75rem);
  max-width: 28rem;
  margin: 0 auto;
  perspective: 800px;
}

.bm-card {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: calc(var(--radius) - 2px);
  -webkit-tap-highlight-color: transparent;
}

.bm-card:disabled {
  cursor: default;
}

.bm-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s ease;
  border-radius: inherit;
}

.bm-card.is-flipped .bm-card__inner,
.bm-card.is-matched .bm-card__inner {
  transform: rotateY(180deg);
}

.bm-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  border: 1.5px solid #2a2a2a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.bm-card__back {
  background:
    linear-gradient(145deg, #2b2b2b, #111),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 4px,
      rgba(196, 30, 58, 0.35) 4px,
      rgba(196, 30, 58, 0.35) 8px
    );
  color: #ffd6de;
}

.bm-card__back::after {
  content: "";
  width: 42%;
  height: 42%;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.85;
}

.bm-card__front {
  background: linear-gradient(180deg, #fff8f4, #ffe8e0);
  color: #c41e3a;
  transform: rotateY(180deg);
}

.bm-card.is-matched .bm-card__front {
  background: linear-gradient(180deg, #fff0f4, #ffd0dc);
  border-color: #c41e3a;
  color: #9a0028;
}

.bm-card__icon {
  width: 58%;
  height: 58%;
}

.bm-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.bm-card.is-locked {
  pointer-events: none;
}

.booth-theme .game-result[data-tone="good"] {
  color: #0a7a4a;
}

.booth-theme .game-result[data-tone="bad"] {
  color: #c41e3a;
}

@media (max-width: 420px) {
  .bm-board {
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-card__inner {
    transition: none;
  }
}
