.theme-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}

.theme-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.theme-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.theme-card__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: .3rem solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.theme-card:hover .theme-card__body {
  transform: translateY(-.2rem);
  box-shadow: var(--shadow-md);
}

.theme-card input:checked + .theme-card__body {
  border-color: var(--accent);
  box-shadow: 0 0 0 .4rem var(--accent-ring);
}

.theme-card input:focus-visible + .theme-card__body {
  outline: .3rem solid var(--accent-ring);
  outline-offset: .2rem;
}

.theme-card__preview {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: .1rem solid var(--border);
  background: var(--surface-2);
}

.theme-card__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-weight: 800;
}

.theme-card__check {
  display: none;
  color: var(--accent-text);
}

.theme-card input:checked + .theme-card__body .theme-card__check {
  display: inline;
}

.theme-card__desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
