.scratch-card {
  position: relative;
  display: inline-block;
  font-size: 0;
  visibility: hidden;
}

.scratch-card img {
  width: 100%;
  height: auto;
}

.scratch-card canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  cursor: pointer;
  will-change: transform;
  transform: translate3d(0,0,0);
  -ms-touch-action: none;
  -webkit-touch-action: none;
  -moz-touch-action: none;
  touch-action: none;

  transition: opacity 500ms ease-out 0ms, height 0ms linear 500ms;
}

.scratch-card.revealed canvas {
  opacity: 0;
  height: 0;
}