/* ================================
   社内アルバム：動画サムネ（モーダル再生）
   既存 album.css の .pic_area/figure/img を .album-wrap 内だけで無効化
================================ */

/* セクションの枠 
.album-wrap {
    background: #F3F3F3;
    padding: 1rem 20px 5rem;
    box-sizing: border-box;
}
*/
/* この中は Grid 管理にする（3列 → 767px以下1列） */
.album-wrap .album-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* スマホは1列 */
@media (max-width: 767px) {
    .album-wrap .album-grid {
        grid-template-columns: 1fr;
    }
}

/* 既存の .pic_area figure の正方形化・flex 指定などを打ち消し */
.album-wrap .album-grid figure,
.album-wrap .album-grid .album-item {
    /* サイズ・表示系 */
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;

    /* レイアウトを邪魔する指定の無効化 */
    position: static !important;
    float: none !important;
    flex: none !important;
    /* flex-grow/shrink/basis を無効化 */
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0 !important;
    /* 画像の下にできる隙間対策 */
    letter-spacing: 0 !important;
}

/* 正方形化トリックの削除（小さくなる主因） */
.album-wrap .album-grid figure::before {
    content: none !important;
    padding-top: 0 !important;
    display: none !important;
}

/* figure 内の img のリセット */
.album-wrap .album-grid figure img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;

    /* 位置指定・トリミングの打ち消し */
    position: static !important;
    top: auto !important;
    left: auto !important;
    object-fit: cover !important;

    border: 0 !important;
    border-radius: 8px;
    background: #ddd;
    /* 低速時のプレースホルダ */
    cursor: pointer;
}

/* サムネの再生アイコン */
.album-wrap .album-grid .album-item {
    position: relative !important;
    isolation: isolate;
}

.album-wrap .album-grid .album-item::after {
    content: "▶";
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-weight: 700;
    pointer-events: none;
    font-size: 18px;
}

/* 既存 .pic_area による flex 子数調整スクリプトのダミー要素を無効化（Gridなので不要） */
.album-wrap .album-grid .empty-figure {
    display: none !important;
}

/* ===== モーダル ===== */
.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.video-modal[aria-hidden="false"] {
    display: block;
}

.video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.video-modal__dialog {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(92vw, 1000px);
    height: min(80vh, 620px);
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.video-modal__close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.video-modal__body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal__body video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* スクロール固定 */
.no-scroll {
    overflow: hidden;
    touch-action: none;
}



/* ▼モーダルの前後ナビ（左右全面・縦フルのヒットエリア） */
.video-modal__navbtn {
    position: absolute;
    top: 0;
    bottom: 0;
    /* ← 縦方向に全域 */
    transform: none;
    /* 中央寄せの変形を解除 */
    width: 64px;
    /* 横幅は現状と同等（調整可） */
    height: 100%;
    /* ← 縦はダイアログいっぱい */
    border: none;
    border-radius: 0;
    /* 縦全面化するので角丸は外す */
    background: transparent;
    /* ← 常時 透明に */
    color: #fff;
    font-size: 56px;
    /* ← 矢印を大きく */
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    z-index: 1;
    /* Closeボタンより下に（後述） */
    transition: background-color .15s ease, opacity .15s ease;
}

/* ホバー・フォーカス時は視認性のために薄い幕を表示（任意） */
.video-modal__navbtn:hover,
.video-modal__navbtn:focus {
    background: rgba(0, 0, 0, .2);
    /* ← うっすら見える程度 */
    outline: none;
}

.video-modal__navbtn:disabled {
    opacity: .35;
    cursor: not-allowed;
    background: transparent;
    /* 無効時も透明のまま */
}

/* 位置 */
.video-modal__prev {
    left: 0;
}

.video-modal__next {
    right: 0;
}

/* スマホは押しやすく横幅だけ少し広げる（縦はすでにフル） */
@media (max-width:767px) {
    .video-modal__navbtn {
        width: 72px;
        font-size: 60px;
    }
}

/* Closeボタンは常に最前面に（ナビと干渉しないように） */
.video-modal__close {
    z-index: 2;
}