@media screen and (max-width: 768px) {
    article {
        width: 100%;
        padding-top: 50px;
        padding-bottom: 50px;
        margin-left: auto;
        margin-right: auto;
    }

    article .blog-head {
        margin-bottom: 50px;
    }

    article .blog-head h2 {
        font-size: 20px;
        line-height: 1.4;
        padding-left: 30px;
        padding-right: 10px;
        margin-bottom: 10px;
    }

    article .blog-head h2:before {
        display: inline-block;
        content: "";
        width: 3px;
        height: 24px;
        background-color: #666666;
        position: relative;
        left: -15px;
        top: 3px;
    }
    article .blog-head small{
        margin-left: 30px;
        font-size: 12px;
        display: inline-block;
        color: #333;
        padding: 5px;
        margin-bottom: 10px;
    }
    article .blog-head small.type1{
        background-color: lightblue;
    }
    article .blog-head small.type2{
        background-color: pink;
    }
    article .blog-head small.type3{
        background-color: orange;
    }
    article .blog-head p {
        font-size: 14px;
        padding-left: 35px;
        color: #767676;
        margin-bottom: 10px;
    }

    article .blog-head span.tags {
        padding-left: 20px;
        font-size: 14px;
    }

    article .blog-head span.tags a {
        display: inline-block;
        color: #ffffff;
        background-color: #666666;
        padding: 5px;
        margin-right: 10px;
    }

    article img {
        display: block;
        width: 100%;
        height: auto;
    }

    article .main-text {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }

    article .main-text p {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 30px;
    }

    article .main-text h2 {
        font-size : 26px;
        margin-bottom: 30px;
        padding: 5px 10px;
        background-color: #dddddd;
        line-height: 1.4;
        margin-top: 20px;
    }

    article .main-text h3 {
        font-size: 20px;
        margin-bottom: 20px;
        line-height: 1.4;
        border-bottom: 2px solid black;
        margin-top: 20px;
    }

    article .main-text h4 {
        font-size: 18px;
        margin-bottom: 20px;
        line-height: 1.4;
        margin-top: 20px;
    }

    article .main-text h5 {
        font-size: 16px;
        margin-bottom: 20px;
        line-height: 1.4;
        margin-top: 20px;
    }

    article .main-text a{
        color: #444;
        text-decoration: underline;
    }
    article iframe{
        width: 100%;
        height:  calc((100vw - 40px) * 375/500);
    }
    article .main-text ul{
        margin: 1em 0;
        padding-left: 30px;
        list-style-type: disc;
        line-height: 1.6;
    }
    article .main-text ol{
        margin: 1em 0;
        padding-left: 30px;
        list-style-type: decimal;
        line-height: 1.6;
    }
    article .author{
        width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
        border-top: 1px solid gray;
        padding-top: 50px;
        padding-left: 10px;
        padding-right: 10px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        margin-top: 150px;
        position: relative;
        margin-bottom: 30px;
    }
    article .author span{
        display: block;
        position: absolute;
        padding: 10px 20px;
        top: 0;
        right: 20px;
        background-color: gray;
        color: white;
        text-align: center;
        font-size: 12px;
    }
    article .author img{
        display: block;
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    article .author .profile{
    }
    article .author .profile .name{
        font-size: 14px;
        margin-bottom: 20px;
    }
    article .author .profile .text{
        font-size: 13px;
        line-height: 1.5;
    }
}

@media screen and (min-width: 769px) {
    article {
        width: 600px;
        padding-top: 100px;
        padding-bottom: 50px;
        margin-left: auto;
        margin-right: auto;
    }

    article .blog-head {
        margin-bottom: 50px;
    }

    article .blog-head h2 {
        font-size: 24px;
        padding-left: 15px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    article .blog-head h2 a.title-link {
        color: #333333;
    }

    article .blog-head h2 a.title-link:hover {
        text-decoration: underline;
    }

    article .blog-head h2:before {
        display: inline-block;
        content: "";
        width: 3px;
        height: 24px;
        background-color: #666666;
        position: relative;
        left: -15px;
        top: 3px;
    }

    article .blog-head small{
        margin-left: 15px;
        font-size: 14px;
        display: inline-block;
        color: #333;
        padding: 5px;
        margin-bottom: 10px;
    }
    article .blog-head small.type1{
        background-color: lightblue;
    }
    article .blog-head small.type2{
        background-color: pink;
    }
    article .blog-head small.type3{
        background-color: orange;
    }

    article .blog-head p {
        font-size: 14px;
        padding-left: 20px;
        color: #767676;
        margin-bottom: 10px;
    }

    article .blog-head span.tags {
        padding-left: 20px;
        font-size: 14px;
    }

    article .blog-head span.tags a {
        display: inline-block;
        color: #ffffff;
        background-color: #666666;
        padding: 5px;
        margin-right: 10px;
    }

    article img {
        display: block;
        width: 100%;
        height: auto;
    }

    article .main-text {
        width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    article .main-text p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 30px;
    }

    article .main-text h2 {
        font-size: 30px;
        margin-bottom: 30px;
        line-height: 1.4;
        padding: 5px 15px;
        background-color: #dddddd;
        margin-top: 30px;
    }

    article .main-text h3 {
        font-size: 24px;
        margin-bottom: 20px;
        line-height: 1.4;
        border-bottom: 2px solid black;
        margin-top: 30px;
    }

    article .main-text h4 {
        font-size: 22px;
        margin-bottom: 20px;
        line-height: 1.4;
        margin-top: 30px;
    }

    article .main-text h5 {
        font-size: 20px;
        margin-bottom: 20px;
        line-height: 1.4;
        margin-top: 30px;
    }

    article .main-text a{
        color: #444;
        text-decoration: underline;
    }
    article .main-text a:hover{
        text-decoration: none;
    }

    article .main-text ul{
        margin: 1em 0;
        padding-left: 30px;
        list-style-type: disc;
        line-height: 1.6;
    }
    article .main-text ol{
        margin: 1em 0;
        padding-left: 30px;
        list-style-type: decimal;
        line-height: 1.6;
    }
    article iframe{
        width: 600px;
        height: 450px;
    }
    article .author{
        display: flex;
        position: relative;
        margin-top: 200px;
        border-top: 1px solid gray;
        padding-top: 50px;
        padding-left: 20px;
        padding-right: 20px;
        flex-direction: row;
        justify-content: space-between;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
    article .author span{
        display: block;
        position: absolute;
        padding: 10px 20px;
        top: 0;
        right: 30px;
        background-color: gray;
        color: white;
        text-align: center;
        font-size: 12px;
    }
    article .author img{
        display: block;
        width: 100px;
        height: 100px;
    }
    article .author .profile{
        width: 400px;
    }
    article .author .profile .name{
        font-size: 14px;
        margin-bottom: 20px;
    }
    article .author .profile .text{
        font-size: 13px;
        line-height: 1.5;
    }

}
/* 記事本文の画像とキャプションの余白。
   旧サイトは WordPress の block-library CSS(.wp-block-image 系)で
   間隔が付いていたが、microCMS 移行時にクラスが外れるため、
   同じ値を素の figure / figcaption に対して指定し直す。 */
article .main-text figure {
    margin-bottom: 1em;
}

article .main-text figure img {
    max-width: 100%;
}

article .main-text figcaption {
    margin-top: 0.5em;
    margin-bottom: 1em;
}
