/* 全体のリセットとベース */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* フォームのコンテナ（中央寄せ） */
.box_out {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 10px;
    background-color: #f9f9f7; /* 薄いベージュ */
}

/* タイトル部分 */
h2 {
    text-align: left;
    font-size: 1.2rem;
    border-bottom: 3px double #a1a673; /* オリーブ色の二重線 */
    padding-bottom: 5px;
    margin-bottom: 10px;
}

#mokuji {
    font-size: 0.9rem;
    margin-bottom: 20px;
    background: radial-gradient(#eee 1px, transparent 1px);
    background-size: 4px 4px; /* 背景に薄いドット模様 */
    padding: 15px;
    border: 1px solid #e0e0e0;
}

/* テーブルスタイル */
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
}

tr {
    border-bottom: 1px solid #fff; /* 行の区切りを白で表現 */
}

/* 左側の見出しカラム */
.td_head {
    background-color: #999; /* グレー */
    color: #ffffff;
    padding: 12px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: right;
    width: 30%;
    vertical-align: middle;
}

/* 右側の入力カラム */
.td_odd {
    background-color: #f2f2ed; /* 非常に薄いグレーベージュ */
    padding: 12px 15px;
    font-size: 0.85rem;
}

/* 入力要素の装飾 */
input[type="text"],
input[type="email"],
select,
textarea {
    border: 1px solid #999;
    padding: 4px;
    font-size: 0.9rem;
    background-color: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus {
    background-color: #fffde7; /* 入力中のみ薄い黄色 */
}

/* 注意書きテキスト */
.chui {
    color: #d32f2f;
    font-size: 0.8rem;
    margin-top: 15px;
}

/* 送信エリア */
p[style*="text-align:center"] {
    margin: 20px 0;
    font-size: 0.9rem;
}

input[type="submit"] {
    background: #f0f0f0;
    border: 1px solid #999;
    padding: 8px 30px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 2px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

input[type="submit"]:hover {
    background: #e0e0e0;
}

/* 補助的なスタイル */
span[style*="text-align: left"] {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 5px;
}
/* --- スマホ用レスポンシブ設定 (768px以下) --- */
@media screen and (max-width: 768px) {
    body {
        padding: 10px; /* 全体の余白を少し詰める */
    }

    h2 {
        font-size: 1.1rem;
    }

    .box_out {
        padding: 5px;
        border: none; /* スマホでは外枠を消してスッキリさせる */
        background-color: transparent;
    }

    /* テーブルの「横並び」を解除して「縦並び」にする */
    table, tbody, tr, td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 4px;
        overflow: hidden;
    }

    /* 見出し部分（グレー）を上に配置 */
    .td_head {
        text-align: left;
        background-color: #666; /* 少し濃くして視認性アップ */
        padding: 8px 12px;
        width: 100% !important;
    }

    /* 入力部分を下に配置 */
    .td_odd {
        background-color: #fff;
        padding: 15px 12px;
        width: 100% !important;
    }

    /* 入力欄の横幅をいっぱいにする */
    input[type="text"],
    input[type="email"],
    select,
    textarea {
        width: 100% !important;
        height: auto;
        font-size: 16px !important; /* iPhoneの自動ズーム防止 */
        padding: 10px !important;
        margin-bottom: 5px;
    }

    /* ラジオボタンとチェックボックスのラベルを押しやすく */
    label {
        display: inline-block;
        padding: 8px 0;
        margin-right: 10px;
        line-height: 1.8;
    }

    /* 郵便番号や電話番号の短い入力欄もスマホでは100%に */
    input[name^="郵便番号"], 
    input[name^="電話番号"],
    input[name="その他テキスト"] {
        width: 100% !important;
        margin-bottom: 8px;
    }

    /* 送信ボタンを大きく押しやすく */
    input[type="submit"] {
        width: 100%;
        padding: 15px;
        font-weight: bold;
        background-color: #a1a673; /* タイトルの二重線に合わせたオリーブ色 */
        color: #fff;
        border: none;
    }
}