/* ==========================================
    2. ギャラリーページ用
   ========================================== */
.el_profileImg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Block: Filter Bar --- */
.bl_filterBar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}
.bl_filterBar button {
    background: none;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-primary);
    border-radius: 30px;
    transition: all 0.3s;
    background: var(--color-body-white);
}
.bl_filterBar button.active {
    background-color: var(--color-primary, #4f46e5);
    color: #fff;
    font-weight: bold;
}
@media (min-width: 769px) {
    .bl_filterBar {
    justify-content: left;

}
}

/* --- Block: Gallery Card --- */
/* JSとの連携用：.gallery-card, .show, .hide は維持 */
.bl_galleryCard {
    background: var(--color-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, opacity 0.4s ease;
    /* text-decoration: none; 不要（aタグ側に移動） */
    /* color: inherit; 不要（aタグ側に移動） */
    display: flex;
    flex-direction: column;
}

.bl_galleryCard:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}
.bl_card_link {
    text-decoration: none; /* 下線を消す */
    color: inherit;        /* 文字色を親から継承（青くならないようにする） */
    display: block;        /* カード全体に広がるようにブロック要素化 */
    height: 100%;
}

/* JSフェードイン用アニメーション */
.bl_galleryCard.hide { display: none; }
.bl_galleryCard.show { animation: fadeIn 0.5s forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bl_galleryCard_imgWrapper {
    aspect-ratio: 16 / 10;
    background-color: var(--color-card);
    overflow: hidden;
}

.bl_galleryCard_imgWrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl_galleryCard_body {
    padding: 24px;
}

.bl_galleryCard_title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--color-primary);
}
.bl_card_categoryList {
    display: flex;         /* 横並びにする */
    flex-wrap: wrap;       /* 幅が足りない時に折り返し許可 */
    gap: 8px;              /* リスト間の余白 */
    list-style: none;      /* ポインタ（・）を消す */
    padding: 0;
    margin: 0;
}
.bl_card_categoryList li {
    font-size: var(--font-size-note);
}


/*------------------------------------------------------------------------------------
　年齢認証
------------------------------------------------------------------------------------*/
.bl_ageModal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background-color: rgba(27, 27, 27, 0.95);
    z-index: 1000; /* ヘッダーより上に表示 */
    display: none; /* JSで制御 */
}

/* 年齢確認が必要な時のボディ制限 */
body.agecheck {
    overflow: hidden;
}

.bl_ageModal_inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: #ffffff;
}

.bl_ageModal_caution {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.bl_ageModal_memo {
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 30px;
}

/* ボタンレイアウト */
.bl_ageModal_btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.el_ageBtn {
    display: inline-block;
    width: 140px;
    height: 50px;
    line-height: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
}

.el_ageBtn__yes {
    background-color: #ffffff;
    color: #000000;
}

.el_ageBtn__yes:hover {
    background-color: #e70000;
    color: #ffffff;
}

.el_ageBtn__no {
    background-color: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.bl_ageModal_linkInfo {
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.8;
}

.bl_ageModal_check {
    margin-top: 30px;
}

.bl_ageModal_check label {
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* タブレット・PCサイズ調整 */
@media (min-width: 769px) {
    .bl_ageModal_caution { font-size: 2rem; }
    .bl_ageModal_memo { font-size: 1.25rem; }
    .el_ageBtn { width: 200px; height: 70px; line-height: 70px; font-size: 1.5rem; }
    .bl_ageModal_btns { gap: 40px; }
}

/* --- 初期状態：R18系を隠す --- */
.filter-bar button[data-filter="r18-illust"] {
    display: none;
}

/* --- R18モード有効時：表示する --- */
body.is-r18-mode .filter-bar button[data-filter="r18-illust"] {
    display: block; /* カードのスタイルに合わせて flex 等に変更してください */
}

/* ==========================================
    2. ギャラリー個別ページ用
   ========================================== */

/* スライダーの窓 */
.bl_image_inner__detail {
    position: relative; /* 子要素の絶対配置の基準 */
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 2;
}

/* 画像：全て同じ位置に重ねる */
.js_slider_item {
    position: absolute;
    inset: 0;
    opacity: 0; /* 通常は隠す */
    pointer-events: none; /* クリックを無効化 */
    transition: opacity 0.3s ease; /* 切り替えを滑らかにする場合 */
    object-fit: contain;
}

/* 表示中のみ表示 */
.js_slider_item.__active {
    opacity: 1;
    pointer-events: auto; /* 表示中のみクリック（モーダル等）を許可 */
}

.bl_image_img__detail {
    object-fit: contain;
    vertical-align: bottom;
}

/* --- サイドバー要素ここから --- */
.bl_infoCard {
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: 100%;
    box-sizing: border-box;
    background: var(--color-card);
    padding: 24px;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--border, #e2e8f0);
}
.bl_infoCard_header {
    margin-bottom: var(--space-content-s);
    padding-bottom: var(--space-component-m);
    border-bottom: 1px solid var(--color-body-darker);
}
.el_badge {
    font-size: var(--font-size-note);
}
.el_workTitle {
    font-size: clamp(1.2rem, 0.6vw + 1.06rem, 1.5rem);
    font-weight: bold;
    margin-top: var(--space-component-s);
    line-height: 1.3;
    color: var(--color-primary);
}
.bl_infoCard_section {
    margin-bottom: var(--space-content-s);
}
.bl_infoCard_footer {
    margin-bottom: 0;
}
.bl_infoCard_label {
    display: block;
    font-size: clamp(0.81rem, 0.12vw + 0.78rem, 0.87rem);
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: var(--space-component-m);
}
/* .bl_infoCard_concept p {
    white-space: pre-wrap;
} */
@media (min-width: 1024px) {
    .bl_infoCard_section:has(.bl_infoCard_concept) {
        /* flex: 1; */
        min-height: 0; /* Flex内のスクロールを有効にするための必須設定 */
        display: flex;
        flex-direction: column;
        border-bottom: 1px dotted var(--color-body-darker);
    }
    .bl_infoCard_concept {
        overflow-y: auto; /* ここで初めてスクロールが発生する */
        padding-right: 8px; /* スクロールバーとの重なりを防止 */
        /* スクロールバーのデザイン（任意：細くする） */
        scrollbar-width: thin;
    }
    .bl_infoCard_concept::-webkit-scrollbar {
        width: 6px;
    }
    .bl_infoCard_concept::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: 10px;
    }
}
/* --- Block: Spec Table --- */
.bl_specTable {
    width: 100%;
    font-size: var(--font-size-note);
}
.bl_specTable_row {
    display: flex;
    justify-content: space-between;
    padding-block: var(--space-component-s);
    border-bottom: 1px dotted var(--color-body-darker);
}
.bl_specTable_row dt, dd {
    font-size: var(--font-size-sub);
}
.bl_specTable_row dt {
    white-space:nowrap;
}
.bl_specTable_row dd {
    font-weight: bold;
    text-align: right;
}
.bl_linkList {
    margin-top: 24px;
    margin-inline: auto;
}
/* --- サイドバー要素ここまで --- */

/* --- Block: Detail Grid (拡大画像など) --- */
.el_subHeading {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: var(--font-size-h4);
    font-weight: 700; margin-bottom: 1.2rem;
}
.el_subHeading::before {
    content: "";
    width: 4px;
    height: 1.2em;
    background-color: var(--color-primary);
    border-radius: 2px;
}

/* --- Block: Slider (枠固定・中身切り替え方式) --- */
.bl_slider_viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    contain: paint; /* レンダリング範囲を限定して安定させる [cite: 92] */
    background-color: #f5f5f5;
}

/* スライダーの土台：移動しないため flex ではなく relative で重ねる */
.bl_image_inner__detail {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: var(--body-card-color);
}

/* 画像：全て同じ位置に重ねる [cite: 78] */
.js_slider_item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* アスペクト比を維持して収める [cite: 80, 81] */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease; /* フェード切り替え [cite: 80] */
    vertical-align: bottom;
}

/* 表示中のみ表示 [cite: 81] */
.js_slider_item.__active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Slider Controls: 安定化 --- */
.bl_slider_controls {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 50px; /* 左右ボタンを固定 [cite: 99] */
    align-items: center;
    gap: var(--space-component-m);
    width: 100%;
    margin-top: var(--space-content-s);
}
/* --- サムネイルを囲むコンテナ --- */
.bl_slider_thumbWrapper {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    overflow-x: auto; /* はみ出たらスクロール可能に */
    scrollbar-width: none; /* Firefox用：スクロールバーを隠す */
    -ms-overflow-style: none; /* IE/Edge用 */
    
    /* 滑らかなスクロールを有効化 */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Chrome, Safari用：スクロールバーを隠す */
.bl_slider_thumbWrapper::-webkit-scrollbar { 
    display: none; 
}

/* サムネイルを並べる土台 */
.bl_slider_dots {
    display: flex;
    gap: var(--space-component-s);
    width: max-content; /* 中身の合計幅に広がるようにする */
    padding: 10px 0; /* アクティブ時の枠線が切れないように余白を確保 */
}

/* サムネイル単体 */
.el_dot {
    flex: 0 0 100px; /* 幅を固定（120pxから少し小さくすると見やすいです） */
    aspect-ratio: 3 / 2;
    margin: 0 2px;
    padding: 0;
    border: 2px solid transparent;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.el_dot img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* サムネイル画像はcoverで隙間なく表示 */
}

.el_dot.__active {
    border-color: var(--color-accent); /* または var(--color-accent) */
    opacity: 1;
    transform: scale(1.05); /* 選択中を強調 */
}



/* ムービーセクション用 */
.bl_video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000;
}

.bl_iframe_container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9比率 */
}

.bl_iframe_container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
/* 親要素：ここを基準にアイコンを配置 */
.js_movieTrigger {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
}

/* 1. 背景のオーバーレイ（提示いただいたコード） */
/* --- 通常時 --- */
.js_movieTrigger::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--color-body-darker);
    /* ★修正：通常時もうっすら膜を張る（例：0.3） */
    opacity: 0.3; 
    transition: opacity 0.2s ease;
    z-index: 1;
}

.js_movieTrigger::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2rem;
    /* ★修正：通常時もアイコンを表示する */
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 2;
}

/* --- ホバー時 --- */
.js_movieTrigger:hover::before {
    /* ★修正：ホバー時はさらに暗くする */
    opacity: 0.6; 
}

.js_movieTrigger:hover::after {
    /* ★修正：ホバー時はアイコンを完全にくっきりさせる */
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.1); /* 少し大きくする演出 */
}