WP Theme Customizer – Responsive Elements

You could output large image inside an inline @media block assuming you are talking about window width and not literally screen width. Also providing a default if neither option is set so first if statement is not required.

.thumbnail {width: <? php echo get_option('thumbnail_size_medium') ?: $default_size; ?>;}

<?php if( get_option('thumbnail_size_large') ) { ?>@media ( min-width: 981px ) {.thumbnail {width: <?php echo get_option('thumbnail_size_large'); ?>;}<?php } ?>