Peripheral cyclic β-amino acids balance the stability and edge-protection of β-sandwiches.