body {
    font-family: 'Helvetica', 'Arial', sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
}

header {
    background-color: #454747;
    color: white;
    padding: 10px 20px;
    position: relative; /* 相対位置指定 */
}

header h1 {
    margin: 0;
    font-size: 35px; /* フォントサイズを2remに設定 */
}

nav ul {
    padding: 0;
    list-style: none;
}

nav ul li {
    display: inline;
    margin-right: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px; /* フォントサイズを1.7rmに設定 */
}

nav ul li a:hover {
    text-decoration: underline;
}

/* 右下のテキストを配置するスタイル */
.header-right {
    position: absolute;
    bottom: 26px; /* 下からの距離を調整 */
    right: 20px; /* 右からの距離を調整 */
}

.header-right p {
    margin: 0;
    font-size: 20px; /* フォントサイズを適宜調整 */
    color: white; /* テキストの色を白に設定 */
}

h2{
    /*font-size: calc(0.5em + 1vw);*/
    font-size: 22px;
}

h3 {
    font-size: 18px; /* ここで適切なサイズを設定 */
}
.container {display: flex;
            justify-content: center; /* 水平方向の中央揃え */
            align-items: center; /* 垂直方向の中央揃え */
            /*height: 100vh; コンテナの高さをビューポートの高さに合わせる */
            margin: 1vw;
        }

.text {
        font-size: 30px;
        margin: 5px;
        }

form {
    /*width: 45%; /*formの白枠を調整*/
    width: 520px;
    margin: auto;
    max-width: 550px;
    padding: 15px;
    padding-left: 18px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px px rgba(0, 0, 0, 0.1);
    font-size: 25px;/*2rem;*/
    height: 1750px; /*autoから固定値に変更*/
    margin-bottom: 100px;
}

/* フォーム全体の整頓 */
.form-row {
    /*display: flex;4/11修正*/ 
    display: table;
    width: 100%;
    flex-direction: column; /* 子要素を縦に並べる */
    flex-wrap: wrap;
    justify-content: space-between; /* もし間隔が必要なら */
}

.form-column {
    /*display: flex;4/11修正*/ 
    display: table-row;
    flex-direction: column;
    width: calc(50% - 10px); /* カラム間に20pxのギャップを想定 */
    margin-bottom: 20px; /* 縦方向の余白 */
}

/* 入力フォームまとめて調整 */
.input-style, .input-style-city{
    display: table-cell; /*修正*/
    border: 1px solid #ccc;
    width: 135px ; /*幅の調整*/
    height: 35px ;/*2.5vw ; /*枠の高さの設定*/
    font-size: 15px ; /*フォントサイズの設定*/
    /*padding: 10px ;/ 
    margin-left: 5%; /*要素の左の余白を設定し中央に寄せ*/
    margin-bottom: 25px ; /*4/11：とりあえず3%に変更*/
    border: 1px solid grey ; /*枠の色*/
    border-radius: 5px ; /*枠の角を丸くする*/
    background-color: #f8f8f8;  /*ライトグレーの背景*/
    /*box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);*/
    box-sizing: border-box ; 
  }

.form-column label,
.form-column .input-style 
{
    display: table-cell;
    /* 他のスタイリング */
}

.unit {
    margin-left: 5px;
    font-size: 18px;
}

/*.form-column label {
    padding-right: 10px; /* ラベルと入力フィールドの間に余白を設定 */

/* 運動強度と服装のセクションタイトル */
input[type=submit] {
    border: none;
    background-color: #454747;
    color: white;
    cursor: pointer;
    padding: 8px 30px;
    margin-top: 8px;
}

label {
    /*font-weight: bold; *//* ラベルを強調 */
    color: black; /* 読みやすい色 */
    display: block;
    margin-top: 8px;
    margin-bottom: 5px; /* 余白を適切に設定 */
    text-align: left; /* ラベルを左揃えに */
    font-size: 17.5px; /* フォントサイズを固定 */
    width: 52% ;
}

.radio-group{
    display: contens;
}

.radio-group label{
    width:100%;
}

.radio-inline, .checkbox-inline {
    display: inline-block;
    margin-right: 10px;
}

.radio-inline label, .checkbox-inline label {
    margin: 0 25px 0 0;
    padding: 0;
}


/* 既存のCSSに加えて */
.form-section {
    margin-top: 20px;
}

.radio-group label {
    display: flex; /* ラジオボタンを縦に並べる */
    margin-bottom: 25px; /* ラジオボタンの間に余白を追加 */
    align-items: center
}

/* カスタムフォントの適用 */
@import url('https://fonts.googleapis.com/css?family=Your+Custom+Font');

body, input, button, select {
    font-family: 'Helvetica', 'Arial', sans-serif;
}


/* カスタムラジオボタン */
input[type="radio"] {
    appearance: none; /* デフォルトのスタイルを消去 */
    width: 17px; /* カスタムサイズ */
    height: 17px; /* カスタムサイズ */
    background-color: #f0f0f0; /* ライトグレーの背景 */
    border-radius: 50%; /* 完全な円形 */
    border: 1px solid #d0d0d0; /* 境界線のスタイリング */
    margin-right: 10px;
    margin-top: 0px;
}

input[type="radio"]:checked {
    background-color: #ffa500; /* 選択時のカラー */
    border-color: #ffa500; /* 選択時の境界線カラー */
}

/* カスタム送信ボタン */
.submit-btn {
    border-radius: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0); /* ボタンの影 */
    transition: background-color 0.3s ease;
    display: block; /* ボタンをブロック要素にする */
    /*width: 50%; /* ボタンの幅を調整 */
    margin: 0 auto;
    font-weight: bold;
    font-size: 21px;
}

.submit-btn:hover {
    background-color: #fc4a4a; /* ホバー時の色変更 */
}

/* フッターの設定 */
footer {
    /*background-color: #333;*/
    color: black;
    text-align: center;
    /*padding: 20px;*/
    margin-top: 45px;
    /*position: fixed;*/
    left: 0;
    bottom: 0;
    width: 100%;
}

footer nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

footer nav ul li {
    display: inline;
    margin: 0 10px;
}

footer nav ul li a {
    color: black;
    text-decoration: none;
}

footer nav ul li a:hover {
    text-decoration: underline;
}

/* レスポンシブデザインのためのメディアクエリを調整 */
@media (max-width: 768px) {
    .form-column {
      width: 48%; /* 2つの要素を横に並べる */
      margin-bottom: 20px; /* 下のマージンを追加して、折り返し時にスペースを作成 */
      margin-right: 2%; /* ここも調整 */
    }
  
    .form-column:last-child {
      margin-right: 0; /* 最後のカラムは余白を設定しない */
    }
}

/* レスポンシブデザインのためのメディアクエリを調整 スマホ用 */
@media (max-width: 767px) {
    form {
      width: 360px; /* 2つの要素を横に並べる */
      min-width: 300px;
      height: 1710px;
      /*height: 132vh;*/
      /*margin-bottom: 20px; /* 下のマージンを追加して、折り返し時にスペースを作成 */
      /*margin-right: 2%; /* ここも調整 */
    }
    header {
        background-color: #454747;
        color: white;
        padding: 5px 10px;
        position: relative; /* 相対位置指定 */
    }
    
    header h1 {
        margin-top: 5px;
        font-size: 20px; /* フォントサイズを2remに設定 */
    }
    
    nav ul {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 0;
        list-style: none;
    }
    
    nav ul li {
        display: inline;
        margin-right: 15px;
    }
    
    nav ul li a {
        color: white;
        text-decoration: none;
        font-size: 15px; /* フォントサイズを1.7rmに設定 */
    }
    
    nav ul li a:hover {
        text-decoration: underline;
    }

    /* 右下のテキストを配置するスタイル */
    .header-right {
        position: absolute;
        bottom: 14px; /* 下からの距離を調整 */
        right: 8px; /* 右からの距離を調整 */
    }

    .header-right p {
        margin: 0;
        font-size: 12.5px; /* フォントサイズを適宜調整 */
        color: white; /* テキストの色を白に設定 */
    }
    
    h2{
        /*font-size: calc(0.5em + 1vw);*/
        font-size: 20px;
        margin-top: 2.5px;
        margin-bottom: 10px;
    }
    
    h3 {
        font-size: 18px; /* ここで適切なサイズを設定 */
    }
    .container {display: flex;
                justify-content: center; /* 水平方向の中央揃え */
                align-items: center; /* 垂直方向の中央揃え */
                /*height: 100vh; コンテナの高さをビューポートの高さに合わせる */
                margin: 1vw;
            }
    
    .text {
            font-size: 17px;
            margin: 5px;
            }

    /* 入力フォームまとめて調整 */
    .input-style {
        display: table-cell; /*修正*/
        border: 1px solid #ccc;
        width: 110px ; /*幅の調整*/
        height: 35px ;/*2.5vw ; /*枠の高さの設定*/
        font-size: 15px ; /*フォントサイズの設定*/
        /*padding: 10px ;/ 
        margin-left: 5%; /*要素の左の余白を設定し中央に寄せ*/
        margin-bottom: 25px ; /*4/11：とりあえず3%に変更*/
        border: 1px solid grey ; /*枠の色*/
        border-radius: 5px ; /*枠の角を丸くする*/
        background-color: #f8f8f8;  /*ライトグレーの背景*/
        /*box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);*/
        box-sizing: border-box ; 
    }
    .input-style-city {
        display: table-cell; /*修正*/
        border: 1px solid #ccc;
        width: 140px ; /*幅の調整*/
        height: 35px ;/*2.5vw ; /*枠の高さの設定*/
        font-size: 15px ; /*フォントサイズの設定*/
        /*padding: 10px ;/ 
        margin-left: 5%; /*要素の左の余白を設定し中央に寄せ*/
        margin-bottom: 25px ; /*4/11：とりあえず3%に変更*/
        border: 1px solid grey ; /*枠の色*/
        border-radius: 5px ; /*枠の角を丸くする*/
        background-color: #f8f8f8;  /*ライトグレーの背景*/
        /*box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);*/
        box-sizing: border-box ; 
    }

    label {
        /*font-weight: bold; *//* ラベルを強調 */
        color: black; /* 読みやすい色 */
        display: block;
        margin-top: 8px;
        margin-bottom: 5px; /* 余白を適切に設定 */
        text-align: left; /* ラベルを左揃えに */
        font-size: 15.5px; /* フォントサイズを固定 */
        width: 52% ;
    }

    /* カスタムラジオボタン */
    input[type="radio"] {
        appearance: none; /* デフォルトのスタイルを消去 */
        width: 15px; /* カスタムサイズ */
        height: 15px; /* カスタムサイズ */
        background-color: #f0f0f0; /* ライトグレーの背景 */
        border-radius: 50%; /* 完全な円形 */
        border: 1px solid #d0d0d0; /* 境界線のスタイリング */
        margin-right: 10px;
        margin-top: 0px;
    }

    input[type="radio"]:checked {
        background-color: #ffa500; /* 選択時のカラー */
        border-color: #ffa500; /* 選択時の境界線カラー */
    }

    /* カスタム送信ボタン */
    .submit-btn {
        border-radius: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0); /* ボタンの影 */
        transition: background-color 0.3s ease;
        display: block; /* ボタンをブロック要素にする */
        /*width: 50%; /* ボタンの幅を調整 */
        margin: 0 auto;
        font-weight: bold;
        font-size: 16.5px;
    }

    .form-column:last-child {
      margin-right: 0; /* 最後のカラムは余白を設定しない */
    }

    /* フッターの設定 */
    footer {
    /*background-color: #333;*/
    color: black;
    text-align: center;
    /*padding: 20px;*/
    margin-top: 25px;
    /*position: fixed;*/
    left: 0;
    bottom: 0;
    width: 100%;
    }

    footer {
        /*background-color: #333;*/
        color: white;
        text-align: center;
        padding: 0px;
        margin-top: 25px;
    }
    
    footer nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
    }
    
    footer nav ul li {
        display: inline;
        margin: 0 5px;
    }
    
    footer nav ul li a {
        color: black;
        text-decoration: none;
    }
    
    footer nav ul li a:hover {
        text-decoration: underline;
    }
}

@media (min-width: 768px) and (max-width: 1280px) {
    body {
        font-family: 'Helvetica', 'Arial', sans-serif;
        background-color: #f7f7f7;
        margin: 0;
        padding: 0;
    }
    
    form {
        /*width: 45%; /*formの白枠を調整*/
        width: 520px;
        margin: auto;
        max-width: 550px;
        padding: 15px;
        padding-left: 18px;
        background-color: #ffffff;
        border-radius: 8px;
        box-shadow: 0 2px px rgba(0, 0, 0, 0.1);
        font-size: 25px;/*2rem;*/
        /*height: 1790px; /*autoから固定値に変更*/
        height: 1820px;
        /*height: 130vh;*/
        margin-bottom: 100px;
    }

    header {
        background-color: #454747;
        color: white;
        padding: 10px 20px;
    }
    
    header h1 {
        margin: 0;
        font-size: 35px; /* フォントサイズを2remに設定 */
    }
    
    nav ul {
        padding: 0;
        list-style: none;
    }
    
    nav ul li {
        display: inline;
        margin-right: 15px;
    }
    
    nav ul li a {
        color: white;
        text-decoration: none;
        font-size: 20px; /* フォントサイズを1.7rmに設定 */
    }
    
    nav ul li a:hover {
        text-decoration: underline;
    }

    footer {
        /*background-color: #333;*/
        color: white;
        text-align: center;
        padding: 0px;
        /*margin-top: 5vh;*/
       margin-top: 40px;
       margin-bottom: 40px;
    }
}