Media types do not allow you to detect touch capabilities as part of the standard:
http://www.w3.org/TR/css3-mediaqueries/
So, there is no way to do it consistently via CSS or media queries, you will have to resort to JavaScript.
No need to use Modernizr, you can just use plain JavaScript:
<script type="text/javascript"> var is_touch_device = 'ontouchstart' in document.documentElement; if(is_touch_device) alert("touch is enabled!");</script>