viewport-height calculation improved