body {
    font-family: Arial, sans-serif;
}

.trigger {
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;  /* ポップアップ以外の全要素より上に来るよう配置 */
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1001;  /* オーバーレイより前面に来る */
}

@media (max-width: 700px) {
    .popup img {
        width: 250px;
        height: 300px;
    }
}

@media (min-width: 700px) and (max-width: 920px) {
    .popup img {
        width: 350px;
        height: 420px;
    }
}

@media (min-width: 920px) {
    .popup img {
        /* 元画像250*300 */
        width: 23.43vw;  /* 1280の時に300に相当 */
        height: 28.15vw;  /* 1280の時に360に相当 */
    }
}

.ad-container {
    position: relative;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: inline-block;
}

.close-button {
    position: absolute;
    top: -40px;
    right: -10px;
    background: rgb(0 123 255 / 0%);  /* 薄い灰色 */
    color: #dee2e6;  /* 濃い灰色 */
    border: none;
    font-size: 30px;
    width: 40px;
    height: 48px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;  /* 背景色のトランジション効果を追加 */
    user-select: none;  /* テキストの選択を無効にする */
}

/* .close-button:hover {
    background-color: #d0d0d0;
}
*/

.close-button:before {
    content: '✖';  /* ✖ 文字をコンテンツとして追加 */
}


.hidden {
    display: none;
}

.visible {
    display: block;
}
