@media screen and (max-width: 640px) {
body{
  margin: 0;
  padding:0;
  line-height: 1.6;
}

 
    .top,main,.skill{
        font-size: 1rem;
        max-width:100%;

    }




    main h2{
    font-size:2rem;
    margin:1rem 0;
}

 main{
  overflow: hidden;
 }
    .top{
         text-align: center;
         z-index: 3;
         position: relative;
         margin: 0 auto;
         overflow: hidden; /* ← 画像はみ出さない */
    }

     .top .top_img{
        z-index: 1;
        width:600px;
        height: auto;
        position: absolute;
        top: -10%;
        left: -26%;
    }

     
    .title{
        position: relative;
        z-index: 2;
        margin:2.813rem auto;
        padding: 2.5vh;
        max-width: 42.8vh;
        height: auto;
        font-size:1.5rem;
    }

    .title img{
      max-width: 100%;
    }

    .mails{
     width: 100%;
    }


/* =================
    メイン
=================*/

.opening{
  position: relative;
}

.opening .content {
          flex-basis: 65%;
            margin-left: 2rem;
            margin-top: 0rem;
}



.opening article img:nth-of-type(1){
  right: -60%; /* イラストを右に寄せる */
  position: absolute;
}


.opening .line-dragon{
  position: absolute;
  top: 20rem;
  right: 22%;
}

.important{
  position: relative;
}

.important .content{
  flex-basis: 70%; /* flexアイテムの幅を数値で指定 */
  margin-top: 8rem;
  margin-left: 2rem;
}

.important img{
  position: absolute;
  top: 5.6rem;
   right: -80%; /* イラストを右に寄せる */
}




.futurity {
   position: relative;
}

.futurity .content{
  flex-basis: auto; /* flexアイテムの幅を数値で指定 */
  margin:0 1.8rem 0 auto;
  max-width: 60%;
}


.futurity img{
  position: absolute;
  flex-shrink: 0;
  top:-10rem;
  left: -40%; /* イラストを左に寄せる */
}



.skill{
  padding:1.063rem;
  text-align: center;
}

.skill h2{
  margin:2.188rem auto;
}
.skill article{
  width: 98%;
  background-color:#ffffff;
  padding: 1rem;
  margin: 0 auto;
 
}

.list dl{
  display: flex;
  font-size:1.675rem;
  margin:1.063rem 0px;
}

.likes{
  position: relative;
}
.like_img{
  position: absolute;
  left: -52%;
  bottom:0;
}

.likes article{
margin:0 1.8rem 3.5rem auto;
  flex-basis: 60%; /* flexアイテムの幅を数値で指定 */
}


.likes .content:nth-of-type(2) {
    margin-top: 6rem;
    margin-bottom: 3.4375rem;
}

.likes .content:nth-of-type(1) {
    margin-top: 4rem;
}



/* =====================
    トップへ戻るボタン
=====================*/
 .to-top {
    right: 0%;
    transform: none;
  }

   .to-top img{
    max-width:100%;
   }

  .button{
    width: 3.813rem;
    font-size:1rem;
    padding:0.5rem;
  }
   
 }
