.likes-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* いいね・ハート共通アニメーション */
.heart-button,
.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .25s ease-out;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 2px 13px;
}

/* クリック時のアニメ */
.heart-animate,
.like-animate {
    transform: scale(1.5);
}

.like-button img,
.heart-button img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    pointer-events: none;
}

/**
 * home
**/
.home_page {
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    width: 100%;
    background: #ffebf5;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 20%, transparent 21%),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 15%, transparent 16%),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 10%, transparent 11%),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 12%, transparent 13%),
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 18%, transparent 19%);
    background-size:
        120px 120px,
        180px 180px,
        140px 140px,
        200px 200px,
        160px 160px;
    background-position:
        10% 20%,
        50% 60%,
        80% 30%,
        30% 70%,
        60% 10%;
    position: relative;
}

.home_page .inner {
    margin: 0 auto;
    padding: 65px 0 60px 0;
    width: 90.27%;
    max-width: 1170px;
    display: flex;
}

.home_page .inner .main {
    margin: 0 3.85% 0 0;
    padding: 0 0 0 0;
    width: 72.82%;
}

.home_page .inner .main hr.line {
    margin: 55px 0 40px 0;
    padding: 0 0 0 0;
    width: 100%;
    height: 0;
    line-height: 0;
    background: none;
    border: none;
    border-top: 1px solid #BDB9B8;
    clear: both;
}

.home_page .inner .main .paging {
    text-align: center;
    margin-top: 30px;
}

.home_page .inner .main .paging a {
    margin: 0 4px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    color: #ffffff;
    background: #ffb7e5;
    border-radius: 90px;
    display: inline-block;
    transition: all 0.5s 0s;
}

.home_page .inner .main .paging a:hover {
    background: #ff7bac;
}

.home_page .inner .main .paging .current {
    margin: 0 4px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    color: #ffffff;
    background: #ff7bac;
    border-radius: 90px;
    display: inline-block;
}

.home_page .inner .main .paging .extend {
    margin: 0 4px;
    width: 20px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
}

.home_page .inner .main .images_head {
    margin: 0 0 22px 0;
}

.home_page .inner .main .images_head h3 {
    margin: 0 0 0 0;
    padding: 18px 0 0 1.5em;
    line-height: 1.4em;
    font-size: 22px;
    font-weight: bold;
    text-align: left;
    position: relative;
}

.home_page .inner .main .images_head h3::before {
    content: '';
    position: absolute;
    top: 55%;
    left: 0.6em;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 17px solid #000;
}

.mode-switch {
    display: flex;
    gap: 12px;
}

.mode-btn {
    padding: 6px 12px;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.mode-btn.active {
    background: #ff7bac;
    color: #fff;
    font-weight: bold;
}


.images_head_flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-range {
    display: flex;
    gap: 10px;
}

.range-btn {
    padding: 5px 10px;
    border-radius: 4px;
    background: #eee;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.range-btn.active {
    background: #ff7bac;
    color: #fff;
    font-weight: bold;
}


@media only screen and (max-width: 850px) {
    .home_page {
        margin: 0 0 0 0;
        padding: 45px 0 0 0;
        width: 100%;
    }

    .home_page .inner {
        margin: 0 auto;
        padding: 0 0 0 0;
        width: 100%;
        max-width: 1170px;
        display: block;
        flex-direction: row-reverse;
    }

    .home_page .inner .main {
        margin: 0 0 0 0;
        padding: 0 0 0 0;
        width: 100%;
    }

    .home_page .inner .main .images_head {
        width: 96%;
        margin: 0 auto 22px;
    }


    .images_list {
        padding: 0 0 11px 0;
    }


    .home_page .inner .main hr.line {
        margin: 35px auto 20px auto;
        padding: 0 0 0 0;
        width: 90.27%;
        height: 0;
        line-height: 0;
        background: none;
        border: none;
        border-top: 1px solid #BDB9B8;
        clear: both;
    }

    .home_page .inner .main .paging {
        text-align: center;
    }

    .home_page .inner .main .paging a {
        margin: 0 4px;
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        text-decoration: none;
        font-size: 13px;
        color: #ffffff;
        background: #ffb7e5;
        border-radius: 90px;
        display: inline-block;
    }

    .home_page .inner .main .paging a:hover {
        background: #ff7bac;
    }

    .home_page .inner .main .paging .current {
        margin: 0 4px;
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        text-decoration: none;
        font-size: 13px;
        color: #ffffff;
        background: #ff7bac;
        border-radius: 90px;
        display: inline-block;
    }

    .home_page .inner .main .paging .extend {
        margin: 0 4px;
        width: 20px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        text-decoration: none;
        font-size: 13px;
        display: inline-block;
    }


}

/*メイン画像リスト部分*/
.images_list {
    max-width: 900px;
    margin: 0 auto;
    padding: 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.images_list .image-item {
    border: 2px solid #ccc;
    border-radius: 0 10px 10px;
    flex: 0 0 calc(33.333% - 7px);
    box-sizing: border-box;
    overflow: hidden;

}

.images_list .image-wrapper {
    position: relative;
    overflow: hidden;
}



.images_list .image-wrapper:hover {
    transition-duration: 0.5s;
}

.images_list .image-wrapper:hover img {
    transform: scale(1.2);
}

.images_list .image-wrapper img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-in-out;
}



.images_list .item-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0 5px 0 2.5em;
    border-radius: 3px;
    font-size: 0.8em;
}

.images_list .item-overlay::before {
    content: '';
    position: absolute;
    background-image: url(../images/common/item-overlay.png);
    width: 17px;
    height: 17px;
    background-size: 100%;
    top: 16%;
    left: 10%;

}

.images_list .tag-row {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0px;
    padding: 5px 3px;
    margin: 0px 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;

}

.images_list .tag-button {
    display: inline-block;
    border: 1px solid #000;
    border-radius: 11px;
    padding: 0px 8px;
    margin: 10px 5px 5px 2px;
    cursor: pointer;
}

.images_list .tag-button.plus-tag {
    background-color: #e0e0e0;
    border-color: #aaa;
    color: #555;
    font-weight: bold;
}


@media only screen and (max-width: 850px) {
    .home_page .inner .main .images_head h3 {
        margin: 0 0 0 2%;
    }

    .images_list {
        width: 96%;
        margin: 0 auto;
    }

    .images_list .image-item {
        flex: 0 0 calc(50% - 5px);
        width: auto;
    }

}

@media only screen and (max-width: 550px) {
    .images_list .image-item {
        flex: 0 0 100%;
        width: 100%;
        margin: 0 auto;
    }

}










/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    background-color: rgba(0, 0, 0, 0.8);
    overscroll-behavior: contain;
    touch-action: none !important;
}

.modal .modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
}

.modal .modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #ccc;
    overscroll-behavior: none;
}

.modal #modal-main-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 80vh;
    max-width: 100%;
    object-fit: contain;
}

.modal .close-button {
    color: #fff;
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
}

.modal .close-button:hover {
    color: #ccc;
}

.modal .prev-button,
.modal .next-button {
    position: absolute;
    top: 50%;
    font-size: 32px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.modal .prev-button {
    left: 0;
}

.modal .next-button {
    right: 0;
}

.modal .modal-image-container {
    position: relative;
}

.modal .image-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.18);
    color: #000000;
    padding: 5px 10px;
    border-radius: 50%;
    font-size: 14px;
}

.modal .modal-details {
    background: #fff;
    padding: 10px 15px;
    position: relative;
}

.modal .modal-details .tag-button {
    display: inline-block;
    border: 1px solid #000;
    border-radius: 11px;
    padding: 0px 8px;
    margin: 10px 5px 5px 2px;
    cursor: pointer;
}

.modal .master-mode-button {
    position: absolute;
    top: 5%;
    right: 1%;
    z-index: 20;
    padding: 5px 10px;
    background-color: rgba(128, 128, 128, 0.18);
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.modal.is-master-mode {
    background-color: rgba(0, 0, 0, 0.95);
}

.modal.is-master-mode .modal-details .likes-section .like-button,
.modal.is-master-mode .modal-details .likes-section .heart-button {
    display: none !important;
}

.modal.is-master-mode .tag-row-modal {
    display: none !important;
}

.modal.is-master-mode .image-counter {
    left: 160px;
    right: auto;
    top: 0vh;
}


.modal.is-master-mode .modal-content {
    padding: 0;
    margin: 0;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    background-color: transparent;
}

.modal.is-master-mode .modal-image-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
}

.modal.is-master-mode #modal-main-image {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
}

.modal.is-master-mode .master-mode-button {
    position: fixed;
    z-index: 9999;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.6);
}

.modal.is-master-mode .prev-button,
.modal.is-master-mode .next-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}

.modal.is-master-mode .next-button {
    right: 10px;
}

.modal.is-master-mode .prev-button {
    left: 10px;
}


.master-mode-button-ontime {
    display: none;
}

@media only screen and (max-width: 850px) {
  .modal .close-button {
    top: 5px;
  }

    .modal.is-master-mode .prev-button,
    .modal.is-master-mode .next-button {
        display: none !important;
    }

    .modal .modal-content {
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    .modal.is-master-mode #modal-main-image {
        max-height: 86vh;
    }

    .modal .modal-content {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .modal .modal-content::-webkit-scrollbar {
        display: none;
    }



}


@media only screen and (max-width: 550px) {

    .modal.is-master-mode .modal-content {
        overflow: visible;
    }

    .modal.is-master-mode .modal-image-container {
        height: 100vh;
        width: 100vw;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .modal.is-master-mode .modal-details {
        display: none;
    }

    .modal.is-master-mode .master-mode-button-ontime {
        display: block;
        color: #000000;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 15px;
        padding: 5px 10px;
        position: fixed;
        z-index: 9999;
        top: 0vh;
        left: 20px;
        background-color: rgba(255, 255, 255, 0.6);
    }


}

/* モーダルリール回転 */
body.no-scroll {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
    touch-action: none;
}

#image-modal {
    overscroll-behavior: none;
    touch-action: none;
}

.modal-content.reel-transition {
    transition: transform 0.25s ease-out;
}

/* スワイプ中に追従させる */
.modal-content.reel-moving {
    transition: none;
}

/* スクロールバー非表示（スマホ対応） */
.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 左右スワイプ中 */
#modal-main-image {
    transition: transform 0.25s ease-out;
}