/* ==================================================
   img-overlay  Responsive
   ================================================== */
.img-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.img-overlay--show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.img-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 350ms ease-out;
}

.img-overlay--show .img-overlay__backdrop {
    opacity: 1;
}

.img-overlay__content {
    position: relative;
    width: 60%;
    max-width: 960px;
    padding: 10px;
    box-sizing: border-box;
    transform: scale(0.8);
    opacity: 0;
    transition: opacity 500ms ease-out 100ms, transform 500ms ease-out 100ms;
    transform-origin: center center;
}

.img-overlay--show .img-overlay__content {
    opacity: 1;
    transform: scale(1);
}

.img-overlay__content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 400ms ease-out 200ms, transform 400ms ease-out 200ms;
}

.img-overlay--show .img-overlay__content img {
    opacity: 1;
    transform: scale(1);
}

.img-overlay__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 400ms ease-out 200ms, transform 400ms ease-out 200ms;
    z-index: 10;
}

body.no-scroll {
    overflow: hidden;
}

.no-image, .main-image {
    width: 220px;
    height: 120px;
    border: 2px solid #ccc;
    /* 枠線の太さと色 */
    border-radius: 1px;
    /* 角を少し丸めたい場合 */
}

.x_title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.x_title h2 {
    margin-bottom: 0;
}

.x_title .meta-info {
    margin-left: auto;
    text-align: right;
    font-size: 12px;
    color: #777;
}

.x_title .meta-info span {
    display: block;
    line-height: 1.4;
}

.main-pill {
    border-color: #1abb9c;
    background: #e8f8f3;
    color: #0f8c72;
}

.main-pill:hover {
    background: #d9f2ea;
}


.control-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    border-radius: 18px;
    background: #f7f7f7;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    user-select: none;
    transition: all 120ms ease;
}

.control-pill input {
    margin: 0;
}

.control-pill:hover {
    background: #ececec;
    border-color: #c0c0c0;
}

.delete-pill {
    border-color: #ff7f71;
    background: #fff1ef;
    color: #c8503f;
}

.delete-pill:hover {
    background: #ffe4e0;
}

.control-pill input:disabled+span {
    color: #aaa;
}

@media (max-width: 767px) {
    /* レスポンシブ */

    .img-overlay__content {
        width: 90%;
        max-width: none;
        padding: 6px;
    }

    .img-overlay__content img {
        max-height: 90vh;
    }

    .img-overlay__close {
        top: 6px;
        right: 6px;
    }
}