template: add style for selected elements and unavailable letters.