01 -  Preheat oven to 350°F. Line an 8x8-inch baking pan with parchment paper, allowing excess to hang over two edges for easy removal. 
 02 -  Distribute the pitted cherries evenly over the bottom of the lined pan. 
 03 -  In a large mixing bowl, whisk together all-purpose flour, granulated sugar, and sea salt until thoroughly combined. 
 04 -  Add eggs to the dry mixture and whisk vigorously until the batter is smooth and slightly pale. 
 05 -  Gradually whisk in whole milk, heavy cream, vanilla extract, almond extract (if using), and melted butter, continuing until the batter is completely smooth. 
 06 -  Gently pour the batter over the cherries, ensuring an even distribution. 
 07 -  Sprinkle sliced almonds over the top, if desired. 
 08 -  Transfer pan to oven and bake for 35 to 40 minutes, or until the custard is set and the edges are golden. Test doneness by inserting a toothpick in the center; it should come out clean. 
 09 -  Allow bars to cool completely in the pan to maintain structure. 
 10 -  Lift bars from the pan using the parchment paper, then slice into 12 even pieces. Dust surface with powdered sugar before serving.