/* 全体のスタイル */
body {
    display: flex;
    justify-content: center; /* 横方向中央揃え */
    align-items: flex-start; /* 縦方向は上から配置 */
    min-height: 100vh; /* ビューポート全体の高さを確保 */
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    overflow-x: hidden; /* 横スクロールバーを非表示にする */
}

/* レイアウト全体を中央に揃えるラッパー */
#mainWrapper {
    display: flex;
    flex-direction: column; /* 縦に並べる */
    align-items: center; /* 横方向中央揃え */
    width: 100%;
    max-width: 750px; /* 最大幅を設定 */
    padding: 20px;
    box-sizing: border-box;
    gap: 20px; /* 各要素間の間隔 */
}

/* タイトル部分 */
h1 {
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #f9f9f9;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* 幅を親要素に合わせる */
    max-width: 300px; /* 最大幅を設定 */
    text-align: center;
}

/* 「＋」ボタン */
h1 button {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 30px;
    height: 30px;
    transition: background-color 0.3s;
}

h1 button:hover {
    background-color: #48c8a3;
}

/* フォームコンテナ */
#formContainer {
    display: flex;
    flex-direction: column; /* 縦に並べる */
    width: 100%; /* 親要素に合わせる */
    max-width: 750px; /* 最大幅を設定 */
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px; /* 各フィールド間の間隔 */
    overflow-y: auto; /* 縦スクロールを有効化 */
    max-height: 70vh; /* 縦スクロールが発生する高さを設定 */
}

/* 個別入力フィールド */
.reporter-fields {
    width: 100%; /* 幅を親要素に合わせる */
    max-width: 700px; /* 最大幅を制限 */
    margin: 0 auto; /* フォームを中央揃え */
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.reporter-fields label {
    display: block;
    font-size: 14px;
    margin-top: 10px;
    color: #666;
}

.reporter-fields input[type="text"],
.reporter-fields input[type="number"],
.reporter-fields select {
    width: 100%; /* 各フィールドの幅を100%に調整 */
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}

/* ボタン部分 */
#buttonContainer {
    display: flex;
    justify-content: center;
    gap: 10px; /* ボタン間の間隔 */
    margin-top: 20px;
}

#buttonContainer button,
#buttonContainer a {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    background-color: #5be8c3;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

#buttonContainer button:hover,
#buttonContainer a:hover {
    background-color: #48c8a3;
}
/* 各報告者フィールドの削除ボタン（×） */
.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
}

.remove-btn:hover {
    background-color: darkred;
}

/* 修正：報告者フィールドに `position: relative;` を追加（×ボタンを正しく配置するため） */
.reporter-fields {
    position: relative;
}
