#allcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  gap: 1rem;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.hcard-wrapper.preview {
  position: relative;
  display: block;
  text-decoration: none;
}

.deck-count-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--color-accent);
  color: white;
  font-weight: bold;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

#card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  font-size: 1.25rem;
  font-weight: var(--bold);
  color: var(--purple-3);
  animation: fadeIn 0.3s ease-in-out;
}

#card-loader,
.region-col.align-center.justify-center.text-md.text-purple-3 {
  padding: 2rem;
  text-align: center;
  font-weight: var(--bold);
  color: var(--purple-3);
  animation: pulse 1.2s ease-in-out infinite;
}

.loader-text {
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
