.contact {
    position: relative;
    margin: 0;
    padding: 0;

}
body {
    margin: 0;
    padding: 0;
    font-family: "Noto Serif JP", serif;
    overflow-x: hidden;
    background: linear-gradient(to bottom, #ffffff, #e3f3ff, #d4ecff);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 画像を完全フル幅＋高さ調整 */
.contact img {
    filter: brightness(60%);
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
    /* これ超重要（隙間消える） */
}

/* テキスト重ね */
.contact-text {
    position: absolute;
    top: 73%;
    left: 22%;
    transform: translate(-50%, -50%);

    color: white;
    font-size: 2rem;

    padding: 10px 20px;
    border-radius: 5px;
}


.contact-title {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    /* ←縦並び */
    align-items: center;
    /* ←中央寄せ */
    text-align: center;
}

.contact-title h2 {
    margin-bottom: 10px;
}

.contact-title p {
    margin: 0;
}


/* チェック時 */
.option input:checked+label .box {
    background: #333;
    border-color: #333;
}

/* ✔マーク */
.option input:checked+label .box::after {
    content: "✔";
    color: white;
    font-size: 14px;
    position: absolute;
    top: -2px;
    left: 3px;
}

/* 文字 */
.option .text {
    font-size: 14px;
}

form {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 40px 80px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    /* ←区切り線 */
}

.form-row label {
    width: 180px;
    display: flex;
    justify-content: space-between;
    /* ←これがポイント */
    align-items: center;
    margin: 20px;
}

.form-row input,
.form-row textarea {
    flex: 1;
    padding: 8px;
    box-sizing: border-box;
}


.form-row:last-child {
    border-bottom: none;
}

#message {
    height: 120px;
    /* ←ここで高さ調整 */
    resize: vertical;
    /* ユーザーが上下に伸ばせる */
}

/* 必須バッジ */
.required {
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 10px;
    white-space: nowrap;
}


.optional {
    background: #aaa;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}



button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

button {
    background: #4787ef;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}




@media screen and (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }


    nav ul {
        padding-left: 10px;
        font-size: 10px;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    body h2 {
        font-size: 16px;
    }

    .contact img {
        height: 200px;
    }

    .contact-text h2 {
        font-size: 18px;

    }

    .contact-title {
        margin-top: 0;
    }

    .contact-title p {
        font-size: 14px;
        padding: 10px;
    }

    form {
        padding: 10px 10px;
        margin: 10px 10px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .form-row label {
        width: 100%;
        margin: 0;
        font-size: 14px;
    }

    .form-row input,
    .form-row textarea {
        width: 100%;
        font-size: 14px;
    }

    button {
        width: 100%;
        font-size: 14px;
    }


}