Mix the flour, sugar, and salt in a bowl. Add the cold butter and work it in with your hands or a mixer until crumbly. Add the egg yolk and knead into a smooth dough.
Add cold water if needed. Divide the dough into two portions: a larger portion (⅔) for the bottom and sides, and a smaller portion (⅓) for the lattice.
Wrap both portions in plastic wrap and refrigerate for at least 30 minutes.
Mix the thin apple slices (best sliced with a mandoline) with sugar, cinnamon, lemon juice, flour, and butter pieces.
Preheat the oven to 180°C (top/bottom heat). Roll out the larger dough portion and line the 19 cm baking pan, including the sides (about 3 cm high).
Prick the bottom with a fork and fill with the apple mixture. Roll out the smaller dough portion and cut it into 1 cm strips.
Lay the strips alternately over the filling for a lattice pattern. Press the edges firmly.
Brush with egg yolk, sprinkle with brown sugar, and decorate with almond flakes. Bake on the middle rack for 40-45 minutes, until golden brown.
Let cool and remove from the pan. A tart pan with a removable bottom is helpful.
Dust with powdered sugar before serving.
