html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "游ゴシック Medium", Meiryo, "Open Sans", sans-serif;
}
#contents {
    padding: 40px 0 30px;
    margin: 0 auto;
    width: 960px;
}
h1 {
    padding: 0 0 0 30px;
    margin: 0 0 25px;
    font-size: 22px;
    position: relative;
}
h1:before {
    position: absolute;
    top: 50%;
    display: inline-block;
    content: '';
    height: 1px;
    background-color: #333333;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    left: 0;
    width: 18px;
}

#fair-list {
    display: flex;
    flex-wrap: nowrap;
    align-content: stretch;
}
.fair-item {
    width: 300px;
    flex-basis: 300px;
    margin-right: 30px;
    transition: opacity 0.3s ease;
    text-decoration: none;
}
.fair-item:hover {
    opacity: 0.7;
}
.fair-item .fair-thumb {
    width: 300px;
    height: 300px;
}
.fair-item .fair-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fair-item:last-child {
    margin-right: 0;
}
.fair-info {
    height: calc(100% - 300px);
    box-sizing: border-box;
    padding: 10px 15px;
    background-color: rgb(242, 241, 237);
    color: #333;
}
.fair-date {
    font-size: 18px;
}
.fair-time {
    font-size: 12px;
    margin-bottom: 5px;
}
.fair-name {
    font-size: 16px;
}

#link-wrap a {
    position: relative;
    display: block;
    width: 400px;
    color: #fff;
    font-size: 18px;
    background: #bf4c9b;
    transition: opacity 0.3s ease 0s;
    border-radius: 3px;
    padding: 15px 0px;
    margin: 30px auto 0;
    text-decoration: none;
    text-align: center;
}
#link-wrap a:hover {
    opacity: 0.7;
}
#link-wrap a:before,
#link-wrap a:after {
    position: absolute;
    top: 50%;
    content: "";
    margin: -5px 0 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
#link-wrap a:before {
    right: 20px;
    border-left: 6px solid #fff;
}
#link-wrap a:after {
    right: 22px;
    border-left: 6px solid #bf4c9b;
}

/**
 * SP
 */
 @media print, screen and (max-width: 767px) {
    #contents {
        width: 100%;
        max-width: 100vw;
        padding: 0 10px 15px;
        box-sizing: border-box;
    }
    h1 {
        font-size: 14px;
        margin-bottom: 20px;
        padding-left: 10px;
        line-height: 1;
    }
    h1:before {
        left: -10px;
        width: 15px;
    }

    #fair-list {
        flex-wrap: wrap;
        align-content: initial;
        justify-content: stretch;
    }
    .fair-item {
        background-color: rgb(242, 241, 237);
        width: 100%;
        flex-basis: 100%;
        min-height: 100px;
        padding: 10px 10px 10px 120px;
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        position: relative;
    }
    .fair-item .fair-thumb {
        width: 100px;
        height: 100px;
        position: absolute;
        top: 10px;
        left: 10px;
    }
    .fair-item .fair-info {
        width: 100%;
        height: auto;
        padding: 0;
    }
    .fair-date {
        font-size: 15px;
    }
    .fair-time {
        font-size: 11px;
        margin-bottom: 5px;
    }
    .fair-name {
        font-size: 14px;
        text-decoration: underline;
    }
    #link-wrap a {
        width: 250px;
        margin-top: 15px;
        font-size: 14px;
    }
}
