/* =========================================
   基本スタイル（モバイル・ベース）
   ========================================= */
body {
    font-family: sans-serif;
    line-height: 1.6;
    text-align: justify;
    /* 指定：justifyを記述 */
}

/* 入力エリア・ラベルの文字サイズを一括で16pxに統一 */
label,
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea,
.confirm-item {
    font-size: 16px;
}

.form-container {
    background: #fff;
    padding: 20px;
    max-width: 100%;
    margin: auto;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: bold;
}

/* フォーム要素の共通スタイル（selectとtelを追加） */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px;
    /* 少し余裕を持たせました */
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.required {
    color: red;
    font-weight: bold;
}

.note,
.any {
    font-size: 0.85rem;
    /* メインより少しだけ小さく設定 */
    color: #666;
}

/* ボタン関連 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button,
.button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    /* ボタンもサイズ統一 */
    text-decoration: none;
    text-align: center;
}

/* 「修正する」ボタンのスタイル調整 */
.btn-back {
    display: inline-block;
    background-color: #999;
    /* 落ち着いたグレー */
    color: #fff !important;
    /* 文字色は白で固定 */
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    /* 下線を消す */
    text-align: center;
    line-height: 1.5;
    /* 送信ボタンと高さを合わせる */
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: #777;
    /* ホバー時に少し暗く */
    text-decoration: none;
    color: #fff;
}

.btn-clear {
    background-color: #444;
    color: #fff;
    padding: 6px 15px;
    width: auto;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    /* 削除ボタンは控えめサイズを維持 */
    line-height: 1.5;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.btn-clear:hover {
    background-color: #666;
}

/* エラーメッセージ（視認性強化） */
.error-summary {
    background-color: #fff1f0;
    border: 2px solid #ff4d4f;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    color: #cf1322;
}

.error-summary ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.error-summary li {
    font-weight: bold;
    margin-bottom: 5px;
}

/* 添付ファイル・確認画面 */
.file-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.confirm-item {
    text-align: left !important;
    /* justifyを解除して左詰め */
    word-break: break-all;
    margin-bottom: 15px;
}

.confirm-item strong {
    display: block;
    /* モバイル向けに上下分割 */
    margin-bottom: 5px;
}

/* フィールドセット（上下マージン） */
fieldset {
    margin-top: 30px;
    /* モバイル向けに余白を抑える */
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* 会社名入力欄（1行）の微調整 */
input[type="text"]#company {
    height: auto;
}

/* =========================================
   タブレット・PC向けスタイル (min-width: 601px以上)
   ========================================= */
@media screen and (min-width: 601px) {
    .form-container {
        max-width: 800px;
        padding: 40px;
    }

    .btn-clear {
        padding: 4px 12px;
    }

    .confirm-item strong {
        display: inline;
        /* PCでは一行で表示 */
        margin-bottom: 0;
    }

    fieldset {
        margin-top: 50px;
        /* 指定：上下50px */
        margin-bottom: 50px;
        padding: 20px;
    }
}

/* 送信完了画面のボタン重なり解消 */
.form-container .submit-area {
    display: flex;
    /* 要素を並べる */
    justify-content: center;
    /* 中央寄せ */
    margin-top: 30px;
    /* 上に十分な余白を作る */
    margin-bottom: 30px;
    /* 下にも余白を作る */
    clear: both;
    /* 回り込みを解除 */
    position: relative;
    /* 位置を独立させる */
    z-index: 10;
}

/* ボタン自体のスタイルを再定義して安定させる */
.form-container .button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #333;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    width: auto;
    /* 横幅を自動に */
}

/* フッターとの間隔を確保 */
.container {
    padding-bottom: 60px;
}