.member-card {
    text-align: center;
    margin-bottom: 14px;
    padding-left: 5px;
    padding-right: 5px;
}
.photo-wrapper {
    aspect-ratio: 3 / 4;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
    border-radius: 0%;
    margin: 0 auto 0px auto;
    position: relative;
}
.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
/* --- モーダル全体のリセット --- */
.modal {
    padding: 0 !important;
    overflow-x: hidden; /* 横スクロール禁止 */
}

/* 背景を全画面にフィット */
.modal-backdrop.show {
    opacity: 0.85;
    background-color: #000;
}

/* --- モーダル本体中央配置 --- */
.modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;         /* ← ここ重要: 100%ではなくauto */
    max-width: 95vw;     /* ← はみ出し防止 */
    margin: 0 auto;
    min-height: 100vh;   /* 高さだけは中央揃え維持 */
    overflow-x: hidden;
}

/* コンテンツ背景透明 */
.modal-content {
    background: #fff;
    border: none;
    box-shadow: none;
    margin: 0 auto;
    width: auto;
    max-width: 100%;
    overflow-x: hidden; /* 横スクロール禁止 */
}

/* 本文中央揃え */
.modal-body {
    max-height: 80vh;         /* 画面高の80%まで */
    overflow-y: auto;         /* 縦スクロール許可 */
    overflow-x: hidden;       /* 横スクロール禁止 */
    padding: 2em;
    display: block;
    background-color: white;
}

/* 画像サイズ */
#modalImage {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* 背景スクロール防止 */
body.modal-open {
    overflow: hidden !important;   /* 背景スクロールを確実に防止 */
    position: fixed;               /* モバイルでのスクロール防止に有効 */
    width: 100%;
}

#modalProfile {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- 念のため、全体で横スクロールを禁止 --- */
html, body {
    overflow-x: hidden !important;
}

.member-list {
    max-height: 480px;
    overflow-y: auto;
    margin-left: 0;
    margin-right: 0;
    padding-right: 0;
}
.member-list .col-xs-4,
.member-list .col-sm-3,
.member-list .col-md-2 {
    padding-left: 5px;
    padding-right: 5px;
    box-sizing: border-box;
}
.member-card {
    margin-bottom: 15px;
}
.member-card img.border-success {
    border: 3px solid #f78d8d !important;
}
.member-card img.border-secondary {
    border: 2px solid #ccc;
    opacity: 0.6;
}

.border-shift {
    border: 2px solid rgba(247, 141, 141, 1.0); /* ピンク枠 */
}
.border-default {
    border: 2px solid rgba(180, 180, 180, 1.0); /* グレー枠 */
}
.badge-shift {
    background-color: rgba(247, 141, 141, 0.8); /* ピンク系（自店出勤） */
    color: #fff;
}
.badge-help {
    background-color: rgba(100, 181, 246, 0.9); /* 青系（ヘルプ） */
    color: #fff;
}
.badge-other {
    background-color: rgba(149, 117, 205, 0.9); /* 紫系（他店出勤） */
    color: #fff;
}

.badge-position {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

@media (max-width: 767.98px) {
    .badge-position {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}
