/* ====================================
   キャスト一覧ページ用グリッド
==================================== */
.cast-page-main {
    background-image: url("../img/black.jpg");
    min-height: 100vh;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PCは4列 */
    grid-auto-flow: dense;
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: #000;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.grid-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-size: 1rem;
    text-align: left;
    font-family: "IvyPresto Display", "Times New Roman", serif;
    letter-spacing: 2px;
}

.grid-item.size-large {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item.size-large .grid-name {
    font-size: 1.2rem;
    padding: 15px;
}


/* ====================================
   キャスト個別ページ (単体ページ) 用
==================================== */
.single-cast-body {
    background-color: #111;
    color: #fff;
    margin: 0;
}

.single-cast-main {
    max-width: 900px;  /* 横幅を広げて余裕を持たせる */
    margin: 0 auto;
    padding: 120px 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 150px);
}

.single-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.single-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    border-bottom: 1px solid #ffddb0;
    padding-bottom: 10px;
    margin-bottom: 30px; /* 見出しの下に余白 */
}

.single-name {
    font-size: 2.2rem;
    font-family: "IvyPresto Display", "Times New Roman", serif;
    color: #ffddb0;
    margin: 0;
    line-height: 1.2;
}

.single-sns img {
    width: 30px;
    height: auto;
    display: block;
}

.back-link-wrap {
    text-align: center;
    margin-top: 40px;
}

.back-link-wrap a {
    color: #888;
    font-size: 0.8rem;
    text-decoration: none;
}


/* ====================================
   プロフィール詳細レイアウト
==================================== */
.profile-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.profile-left {
    width: 40%;
    flex-shrink: 0;
}

.profile-right {
    width: 60%;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.6;
}

.profile-table th, 
.profile-table td {
    padding: 12px 10px;
    border-bottom: 1px dotted #555;
    text-align: left;
    vertical-align: top;
}

.profile-table th {
    width: 35%;
    color: #ffddb0;
    font-weight: normal;
    white-space: nowrap; /* 不自然な改行を防止 */
}


/* ====================================
   スマホ対応 (レスポンシブ共通)
==================================== */
@media (max-width: 640px) {
    /* 一覧ページのスマホ対応 */
    .cast-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホは2列 */
        gap: 10px;
    }
    .grid-item.size-large {
        grid-column: span 2;
        grid-row: span 2;
    }

    /* 個別ページのスマホ対応 */
    .single-info {
        margin-bottom: 20px;
    }
    .single-name {
        font-size: 1.8rem;
    }
    .profile-container {
        flex-direction: column;
        gap: 20px;
    }
    .profile-left, 
    .profile-right {
        width: 100%;
    }
    .profile-table {
        font-size: 0.9rem;
    }
    .profile-table th {
        width: 40%;
        white-space: normal; /* スマホは画面が狭いので改行を許容 */
    }
}


/* ====================================
   スクロールバーのカスタマイズ (PC用)
==================================== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #111;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ffddb0;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}