.bottom-banner-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 90%;
    width: 270px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.bottom-banner-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* --- 線を細くしたバツ印（閉じるボタン共通） --- */
.banner-close-btn,
.modal-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;            /* ボタンの幅 */
    height: 20px;           /* ボタンの高さ */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    z-index: 10;           /* <a>タグや画像より手前に配置 */
    transition: opacity 0.2s ease, transform 0.2s ease;
    @media screen and (max-width: 768px) {

    }
}

/* モーダル内のバツ印の位置微調整 */
.modal-close-btn {
    top: 12px;
    right: 6px;

    @media screen and (max-width: 768px) {
        top: 9px;
        right: 2px;
        width: 24px;            /* ボタンの幅 */
        height: 16px;           /* ボタンの高さ */
    }
}

/* CSSの疑似要素で2本の細い直線を描画 */
.banner-close-btn::before,
.banner-close-btn::after,
.modal-close-btn::before,
.modal-close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;          /* ★ここで線の太さを調節できます */
    background-color: #ffffff; /* 白い線 */
}

/* 2本の線を交差させてバツを作成 */
.banner-close-btn::before,
.modal-close-btn::before {
    transform: rotate(45deg);
}
.banner-close-btn::after,
.modal-close-btn::after {
    transform: rotate(-45deg);
}

/* ホバー時の効果 */
.banner-close-btn:hover,
.modal-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* --- 非表示用のクラス --- */
.bottom-banner-container.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 20px);
}

/* ==========================================
   モーダル用スタイル（banner.cssに追記）
   ========================================== */

/* 背景の暗いオーバーレイ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75); /* 暗い背景 */
    z-index: 10000; /* バナー(9999)より前面に表示 */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 非表示用クラス */
.modal-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* モーダルのコンテンツラッパー */
.modal-container {
    position: relative;
    max-width: 90%;
    width: 500px; /* モーダル画像の推奨幅 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    cursor: pointer; /* 画像クリックで遷移できることを示す cursor */
}

/* モーダル画像 */
.modal-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 画像に重ねるカウントダウンテキスト */
.modal-countdown-badge {
    position: absolute;
    bottom: 67px;          /* 画像下部からの距離 */
    left: 58%;
    transform: translateX(-50%);
    color: #ffffff;
    padding: 8px 20px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none; /* テキスト部分をクリックしてもリンクを阻害しない */
}

/* ==========================================
   【画像ごとの個別位置調整】
   ========================================== */

/* 1. 事前告知画像（19:30&#12316;20:10）用の位置設定 */
.modal-container.modal-mode-pre .modal-countdown-badge {
    top: calc(50% + 23px);      /* 下からの距離 */
    left: 53%;         /* 中央寄せ */
    transform: translateX(-50%);
    font-size: min(5vw, 24px);

    @media screen and (max-width: 768px) {
        top: calc(50% + 11px);
    }
}

/* 2. イベント開催中画像（20:10&#12316;810秒間）用の位置設定 */
.modal-container.modal-mode-event .modal-countdown-badge {
    top: calc(50% + 32px);         /* 上からの距離 */
    right: 34%;       /* 右からの距離 */
    bottom: auto;      /* bottomの打ち消し */
    left: auto;        /* leftの打ち消し */
    transform: none;   /* 中央寄せ解除 */
    font-size: min(5vw, 24px);

    @media screen and (max-width: 768px) {
        top: calc(50% + 17px);
    }
}