/* ===== тестовая адаптация: телефон и планшет (<= 948px) ===== */
@media only screen and (max-width:948px){
  html,body{overflow-x:hidden}
  .wrapper,.content,.content-box,.header,.header-fixed-box,.header-absolute-box,.header-absolute,
  .slider-main-box,.footer,.footer-box,.content-border,.box-box{
    width:100%!important;max-width:100%!important;min-width:0!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
  img{max-width:100%;height:auto}
  /* боковая колонка уходит под контент, без полоски слева */
  .column-left{float:none!important;position:relative!important;margin:0!important;width:100%!important;max-width:100%!important;
    padding:0 10px!important;box-sizing:border-box;background:none!important;border:0!important;box-shadow:none!important}
  .column-right{padding:0!important;margin:0!important;overflow:hidden;width:100%!important}
  /* таблицы и широкие блоки прокручиваются внутри себя */
  .column-right table,.full-block table,.sh-block table{display:block;overflow-x:auto;max-width:100%}
  /* карточка фильма и описание */
  .full-content .poster{float:none!important;width:100%!important;margin:0 0 12px!important}
  .full-content .poster .poster-box{margin:0 auto 20px!important}
  .full-content .full-description{float:none!important;width:auto!important;margin:0 10px!important;padding:0!important;
    overflow-wrap:anywhere;word-break:break-word}
  .full-content{overflow:hidden}
  /* поля ввода и кнопки не выходят за экран */
  input,select,textarea,button{max-width:100%;box-sizing:border-box}
}
cat >> "$F" <<'CSS'

/* info-блоки и поля поиска не шире экрана */
@media only screen and (max-width:948px){
  .infoblock-on,.infoblock,.infoblock-bottom{width:auto!important;max-width:100%!important;margin:0 auto!important;box-sizing:border-box}
  .column-right input[type=text],.column-right input[type=search],.content input[type=text]{max-width:100%!important;box-sizing:border-box}
  .column-right form{max-width:100%}
}

/* страница поиска: поле и кнопка на всю ширину, блок ошибки не шире экрана */
@media only screen and (max-width:948px){
  .search,.search-input-box{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .search #searchinput{width:100%!important;max-width:100%!important;box-sizing:border-box}
  .search #dosearch,.search input.bbcodes{display:block;width:100%!important;margin:8px 0 0!important;box-sizing:border-box}
  .berror-block,.berror{width:auto!important;max-width:100%!important;box-sizing:border-box}
}

/* блок «Информация» с отступами от краёв и переносом текста */
@media only screen and (max-width:948px){
  .berror-block{width:auto!important;float:none!important;margin:0 10px!important}
  .berror{padding:10px 12px 14px!important;word-break:break-word;overflow-wrap:anywhere}
}

/* статические страницы (правила и т.п.): блоки с фиксированной шириной в inline-стиле не шире экрана */
@media only screen and (max-width:948px){
  .column-right div[style*="width"],.column-right table[style*="width"],.column-right td[style*="width"],
  .column-right img[style*="width"],.content div[style*="width"]{width:auto!important;max-width:100%!important;box-sizing:border-box}
  .column-right p,.column-right div,.column-right li{overflow-wrap:anywhere}
  .column-right .horizontal-menu,.over-slider-menu{flex-wrap:wrap}
}

/* текст внутри колонки переносится по словам (без nowrap, который уводит строки за экран) */
@media only screen and (max-width:948px){
  .column-right,.column-right *{white-space:normal!important;max-width:100%!important;box-sizing:border-box}
  .column-right{overflow:hidden}
  .column-right img{height:auto}
}

/* подписки: тарифные таблицы прокручиваются по горизонтали внутри блока, текст рядом не сужается */
@media only screen and (max-width:948px){
  .column-right table{display:block;overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
  .column-right table td,.column-right table th{white-space:normal}
  .column-right .berror-block table{display:table}
}

/* телефон: ячейки таблиц (тарифы подписки) идут друг под другом, а не в ряд */
@media only screen and (max-width:948px){
  .column-right table,.column-right tbody,.column-right tr{display:block!important;width:100%!important;max-width:100%!important}
  .column-right td,.column-right th{display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
}

/* страница подписки: тарифы в столбик, блоки 601px не шире экрана */
@media only screen and (max-width:948px){
  .paybbb{display:block!important;width:100%!important;max-width:100%!important;float:none!important;box-sizing:border-box}
  .paysubb{float:none!important;display:block!important;width:100%!important;max-width:100%!important;margin:0 0 16px!important;box-sizing:border-box}
  div[style*="width: 601px"],div[style*="width:601px"]{width:100%!important;max-width:100%!important;box-sizing:border-box}
}

/* компьютер и широкий планшет: контейнер шире 948px, но не больше 1400px */
@media only screen and (min-width:1000px){
  .wrapper,.footer{min-width:0!important}
  .header,.header-fixed-box,.header-absolute-box,.slider-main-box,.content,.content-box,.footer-box{
    width:min(1400px,calc(100vw - 40px))!important;max-width:1400px!important}
}

/* компьютер: единый масштаб шапки, вкладок и карточек (пять карточек в ряд) */
@media only screen and (min-width:1000px){
  .grid .sh-block{width:24%!important;margin:0 0 34px!important}
  .over-slider-menu li a{height:40px!important;line-height:40px!important;font-size:15px!important;padding:0 20px!important}
  .header-fixed .searchbar input[type=text]{height:32px!important;font-size:14px!important}
}

/* компьютер: верхняя полоса выше и уравновешена с вкладками */
@media only screen and (min-width:1000px){
  .header-fixed{min-height:56px!important}
  .header-fixed-box{padding-top:10px!important;padding-bottom:10px!important;box-sizing:border-box}
  .header-fixed .searchbar input[type=text]{height:36px!important;font-size:15px!important}
  .header-fixed .logo img,.header-fixed img.logo{height:38px!important;width:auto!important}
}


/* лента постеров (компьютер): 7 постеров по 165px заполняют ширину, картинка на весь слот */
@media only screen and (min-width:1000px){
  .slider-main-box{height:auto!important;padding-top:10px!important;padding-bottom:10px!important}
  .slider-main .slide img{width:100%!important;height:auto!important;display:block}
  .slider-main .slide a{display:block;width:100%}
}

/* плитки подборок ниже ленты, которая стала выше */
@media only screen and (min-width:1000px){
  .collect-box{position:relative!important;top:76px!important;margin-bottom:24px!important}
}

/* лента (компьютер): слот 165px с зазором 12px, перебивает inline-стиль шаблона слайда (142px) */
@media only screen and (min-width:1000px){
  .slider-main .slide{margin-right:12px!important}
}

/* лента (компьютер): постер заполняет слот целиком (картинка имеет атрибут width=142) */
@media only screen and (min-width:1000px){
  .slider-main .slide img{width:100%!important;height:auto!important;display:block}
  .slider-main .slide a{display:block;width:100%}
}

/* лента (компьютер): окно bxSlider по высоте содержимого, постеры не обрезаются */
@media only screen and (min-width:1000px){
  .slider-main-box .bx-viewport{height:auto!important;min-height:0!important}
  .slider-main-box .bx-wrapper{height:auto!important}
}

/* шапка (компьютер): логотип и вход симметрично отступают от краёв контента */
@media only screen and (min-width:1000px){
  .header-fixed-box{padding-left:6px!important}
}

/* лента: все четыре угла скруглены, как у остальных блоков */
.slider-main-box{border-radius:10px!important}
