How do I make an object only visible when other object is blocking?

I want to make objects look like as if it’s drawn on a paper, and this game is a card game;

  1. There is a static background paper that should be always seen at full screen.

  2. Cards have only strokes. I applied transparent shader so the paper can be seen through.

  3. When two cards intersect, I only want to see the topmost card’s strokes on the intersecting area.

  4. Background paper should be also seen on the intersecting area.

Any ideas to solve this problem?
Please help, thanks in advance.

achieved goal with stencil buffers,