/* --- Modal Styles --- */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* 背景を少し暗くする */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 上下5%、左右中央に配置 */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}

.modal-header {
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
}

.modal-body {
    padding: 16px;
    max-height: 60vh; /* 画面の高さの60%を最大値とし、超えたらスクロール */
    overflow-y: scroll;
}

.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.modal-close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-agree-btn {
    padding: 10px 20px;
    background-color: #ccc; /* 初期状態は非アクティブ */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    transition: background-color 0.3s;
}

.modal-agree-btn:enabled {
    background-color: #6a2c91; /* アクティブな時の色 */
    cursor: pointer;
}