/* メンバー別 劇場公演 出演予定一覧。名前チップ＋クリックでモーダル。 */
#main .ms-note { font-size: .85em; color: #6b7280; }

/* 名前チップの一覧：約5文字幅の固定グリッドで整列させる */
#main .ms-names {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px; margin: 14px 0 6px;
}
#main .ms-name {
    display: flex; align-items: center; justify-content: space-between; gap: 7px;
    background: #fff; border: 1px solid #e3e7ec; border-radius: 999px;
    padding: 8px 14px; font-size: .95em; font-weight: 700; color: #1f2937;
    cursor: pointer; box-shadow: 0 1px 2px rgba(16,24,40,.05);
    transition: border-color .15s, box-shadow .15s, transform .1s;
    white-space: nowrap;
}
#main .ms-name:hover { border-color: #e0568f; box-shadow: 0 4px 10px rgba(224,86,143,.18); }
#main .ms-name:active { transform: translateY(1px); }
#main .ms-name .ms-cnt {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 5px;
    background: #fdeef5; color: #b1487c; border-radius: 999px;
    font-size: .78em; font-weight: 800;
}
/* 出演予定なし（0）＝淡色・クリック不可 */
#main .ms-name--zero {
    color: #9aa1ab; background: #f5f6f8; border-color: #e6e9ee;
    cursor: default; box-shadow: none;
}
#main .ms-name--zero:hover { border-color: #e6e9ee; box-shadow: none; transform: none; }
#main .ms-name--zero .ms-cnt { background: #eceef1; color: #9aa1ab; }
#main .ms-noresult { color: #888; margin-top: 12px; }
#main .ms-empty { color: #6b7280; margin: 16px 0; }

/* モーダル（ポップアップ） */
#main .ms-modal { position: fixed; inset: 0; z-index: 1000; display: flex;
    align-items: center; justify-content: center; padding: 16px; }
#main .ms-modal[hidden] { display: none; }
#main .ms-modal-overlay { position: absolute; inset: 0; background: rgba(17,24,39,.55); }
#main .ms-modal-card {
    position: relative; z-index: 1; width: 100%; max-width: 440px;
    max-height: 86vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 16px; padding: 18px 18px 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
    animation: ms-pop .18s ease-out;
}
@keyframes ms-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
#main .ms-modal-head { border-bottom: 1px solid #eef0f3; padding-bottom: 10px; margin-bottom: 4px; }
#main .ms-modal-title { margin: 0; font-size: 1.25em; font-weight: 800; color: #1f2937; }
#main .ms-modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 2px 2px; }

/* 公演リスト（モーダル内） */
#main .ms-list { list-style: none; margin: 0; padding: 0; }
#main .ms-item { padding: 11px 4px; border-bottom: 1px dashed #e6ebf1; }
#main .ms-item:last-child { border-bottom: none; }
#main .ms-item-head { display: flex; align-items: baseline; gap: 10px; }
#main .ms-date { font-weight: 800; color: #1f2937; font-size: .98em; }
#main .ms-time { font-size: .86em; color: #5b6b62; font-weight: 700; }
#main .ms-stage { margin-top: 2px; font-size: .95em; color: #333; font-weight: 600; }
#main .ms-suppl {
    display: inline-block; margin-left: 4px; font-size: .78em; font-weight: 700;
    color: #c0392b; background: #fdecec; border: 1px solid #f5cccc;
    border-radius: 6px; padding: 1px 7px;
}

#main .ms-modal-link {
    display: block; text-align: center; margin: 12px 0 0;
    color: #b1487c; font-weight: 700; text-decoration: none; font-size: .92em;
}
#main .ms-modal-link:hover { text-decoration: underline; }

/* 大きな閉じるボタン */
#main .ms-close {
    margin-top: 14px; width: 100%;
    border: none; cursor: pointer; -webkit-appearance: none;
    background: linear-gradient(135deg, #ee6ea6, #e0568f);
    color: #fff; font-weight: 800; font-size: 1.15em;
    padding: 16px; border-radius: 14px;
    box-shadow: 0 6px 16px rgba(224,86,143,.32);
    transition: transform .1s;
}
#main .ms-close:active { transform: translateY(1px); }

@media (max-width: 600px) {
    #main .ms-modal { padding: 10px; }
    #main .ms-modal-card { max-height: 90vh; }
}
