/* Responsive scaling cleanup for arcade banners */
.arcade-grid .card-media {
  min-height: 0;
}

.upgraded-snake-preview,
.polished-2048-preview,
.upgraded-mine-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  container-type: inline-size;
}

/* Snake */
.upgraded-snake-preview span {
  width: clamp(24px, 9cqw, 31px);
  height: auto;
  aspect-ratio: 1;
}

.upgraded-snake-preview .snake-head {
  width: clamp(27px, 10.2cqw, 35px);
  height: auto;
}

.upgraded-snake-preview .s1 { left: 15%; top: 63%; }
.upgraded-snake-preview .s2 { left: 25%; top: 63%; }
.upgraded-snake-preview .s3 { left: 35%; top: 63%; }
.upgraded-snake-preview .s4 { left: 45%; top: 53%; }
.upgraded-snake-preview .s5 { left: 45%; top: 38%; }

.arcade-grid .card-media .snake-banner-apple {
  width: clamp(34px, 12.5cqw, 46px);
  height: auto;
  max-width: 46px;
  max-height: 46px;
  aspect-ratio: 1;
  right: 16%;
  top: 25%;
  object-fit: contain;
  transform: rotate(4deg);
  transform-origin: center;
}

.game-card:hover .card-media .snake-banner-apple {
  transform: translateY(-4px) rotate(-3deg) scale(1.05);
}

/* 2048 */
.polished-2048-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  padding: clamp(14px, 6cqw, 22px);
  gap: clamp(5px, 2.25cqw, 8px);
}

.polished-2048-preview span {
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  line-height: 1;
  font-size: clamp(.6rem, 3.15cqw, 1rem);
}

.polished-2048-preview .tile-1024,
.polished-2048-preview .tile-2048 {
  font-size: clamp(.5rem, 2.55cqw, .78rem);
}

/* Minesweeper */
.upgraded-mine-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  padding: clamp(15px, 6.25cqw, 23px);
  gap: clamp(4px, 2cqw, 7px);
}

.upgraded-mine-preview span {
  min-width: 0;
  min-height: 0;
  padding: 0;
  line-height: 1;
  font-size: clamp(.72rem, 3.5cqw, 1rem);
}

.upgraded-mine-preview .flag,
.upgraded-mine-preview .mine {
  padding: clamp(2px, .9cqw, 4px);
}

.upgraded-mine-preview .flag img {
  width: 76%;
  height: 76%;
}

.upgraded-mine-preview .mine img {
  width: 80%;
  height: 80%;
}

.upgraded-mine-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 720px) {
  .arcade-grid .card-media .snake-banner-apple {
    width: clamp(32px, 11cqw, 42px);
    max-width: 42px;
    max-height: 42px;
    right: 15%;
    top: 26%;
  }

  .polished-2048-preview {
    padding: clamp(13px, 5.4cqw, 18px);
    gap: clamp(4px, 1.8cqw, 6px);
  }

  .upgraded-mine-preview {
    padding: clamp(13px, 5.5cqw, 19px);
    gap: clamp(3px, 1.6cqw, 5px);
  }
}

@media (max-width: 380px) {
  .upgraded-snake-preview .s1 { left: 13%; }
  .upgraded-snake-preview .s2 { left: 23%; }
  .upgraded-snake-preview .s3 { left: 33%; }
  .upgraded-snake-preview .s4,
  .upgraded-snake-preview .s5 { left: 43%; }

  .arcade-grid .card-media .snake-banner-apple {
    width: 34px;
    max-width: 34px;
    max-height: 34px;
  }

  .polished-2048-preview .tile-1024,
  .polished-2048-preview .tile-2048 {
    font-size: .5rem;
  }
}
