01 - Preheat the oven to 350°F. Line a 9×13-inch baking pan with parchment paper, allowing overhang on two sides for easy removal later.
02 - In a medium bowl, whisk together the flour, baking powder, and salt until well combined. Set aside.
03 - In a large bowl, beat the softened butter and granulated sugar together with an electric mixer until light and fluffy, approximately 2-3 minutes.
04 - Beat in the whole egg, egg yolk, vanilla extract, and almond extract (if using) until fully incorporated and smooth.
05 - Gradually add the flour mixture to the butter mixture, mixing on low speed just until the flour disappears. Do not overmix.
06 - Transfer the dough to the prepared pan. Use a spatula or lightly floured fingers to press it evenly across the bottom.
07 - Bake for 18-20 minutes until the edges are lightly golden brown but the center remains slightly soft. Avoid overbaking.
08 - Let the bars cool completely in the pan set on a wire rack. The frosting will melt if applied to warm bars.
09 - While bars cool, beat the 1/2 cup softened butter until creamy. Gradually add the powdered sugar, milk, vanilla, and salt. Beat until fluffy and spreadable, adding more milk if needed for desired consistency.
10 - Spread the frosting evenly over the completely cooled bars. Immediately sprinkle with red, white, and blue sprinkles while the frosting is still soft so they adhere well.
11 - Use the parchment paper overhang to lift the bars out of the pan. Cut into 16 equal squares and serve immediately or store in an airtight container.