/* ==========================================================================
   mailform.css - ラジオボタン利便性向上版
   ========================================================================== */

/* 1. フォーム全体のコンテナ */
#mailform {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding: 40px 0;
    background-color: #ffffff;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    box-sizing: border-box;
}

/* 2. テーブル構造の解体 */
.mailform {
    width: 100%;
    border-collapse: collapse;
    display: block;
    border: none !important;
}

.mailform tbody, .mailform tr, .mailform th, .mailform td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    border: none !important;
}

/* 3. 左右に20%のマージン（PC表示時） */
th.lsmall, td.lsmall {
    padding-left: 20% !important;
    padding-right: 20% !important;
    text-align: left;
    border: none !important;
}

/* 4. 文字サイズと注釈の設定 */
th.lsmall {
    padding-top: 30px;
    padding-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #222;
}

.t-small, th.lsmall font, td.lsmall font {
    display: block;
    font-size: 15px !important;
    color: #666;
    margin-top: 8px;
    font-weight: normal;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
}

td.lsmall {
    padding-top: 0;
    padding-bottom: 25px;
    line-height: 2.2; 
}

/* 5. 一般入力欄 */
.mf, input[type="text"], textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 17px;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    vertical-align: middle;
}

.mf:focus, textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 6. 特殊な短い入力（生年月日・身長体重など） */
input[name="西暦"], input[name="月"], input[name="日"], input[name="年齢"],
input[name="身長(必須)"], input[name="体重(必須)"], input[name="靴のサイズ(必須)"] {
    width: 5em !important;
    max-width: 5em !important;
    min-width: 55px !important;
    display: inline-block;
    margin: 4px 4px 8px 0 !important;
    vertical-align: middle;
}

/* 7. ラジオボタン（男女など）の余白調整 */
input[type="radio"], input[type="checkbox"] {
    margin-right: 5px !important;
    vertical-align: middle;
    cursor: pointer;
}

td.lsmall label {
    display: inline-block;
    padding: 5px 0;
    cursor: pointer;
    vertical-align: middle;
}

/* 2つ目以降のラベルに内側余白1emを作り、反応エリアを広げる */
td.lsmall label{
    padding-right: 1em !important;
}

/* 8. ボタンエリア */
.mailform tr:last-child td {
    padding-top: 50px;
    text-align: center;
}

input[type="submit"] {
    display: block;
    width: 100% !important;
    max-width: 300px !important;
    margin: 0 auto 20px auto;
    background-color: #333;
    color: #fff;
    padding: 18px 0;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    appearance: none;
}

input[type="submit"]:hover {
    background-color: #000;
}

input[type="reset"] {
    display: inline-block;
    background: none !important;
    border: none !important;
    color: #888 !important;
    text-decoration: underline;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    appearance: none;
}

table.mailform tr th span {
    color: #CC0000 !important;
    font-size: 16px !important;
}

/* 9. レスポンシブ対応 */
@media screen and (max-width: 768px) {
    #mailform {
        padding: 20px 0;
    }
    th.lsmall, td.lsmall {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }
    th.lsmall {
        font-size: 17px;
        padding-top: 20px;
    }
    .mf, input[type="text"] {
        min-width: 0 !important;
    }
    td.lsmall {
        line-height: 2.5;
    }
}