/* Google Fonts の読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');


.container {
    background: white;
    padding: 40px;
    border-radius: 20px; /* 角を大きく丸く */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* 柔らかい影 */
    width: 100%;
    max-width: 800px; /* 少し幅を広げる */
}

h1 {
    text-align: center;
    color: #1a202c;
    font-size: 1.8rem;
    margin-bottom: 40px;
}

h2 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 20px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
}

/* セクションごとの間隔 */
.tool-section {
    margin-bottom: 50px;
}

/* 入力グループの間隔 */
.input-group {
    margin-bottom: 25px;
}

.input-group p, label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #4a5568;
    font-size: 1rem;
}

/* テキストボックスのスタイル改善 */
input[type="text"], 
input[type="number"], 
select {
    width: 100%;
    padding: 16px; /* 中の余白を大きく */
    font-size: 1.1rem; /* 文字を大きく */
    font-family: 'Noto Sans JP', sans-serif;
    border: 2px solid #e2e8f0;
    border-radius: 12px; /* 角を丸く */
    background-color: #f8fafc;
    transition: all 0.3s ease;
    box-sizing: border-box; /* パディングを含めたサイズ */
    outline: none;
}

/* フォーカス時のアニメーション */
input:focus, select:focus {
    border-color: #4a90e2;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

/* モード切替ボタン */
.toggle-container {
    text-align: center;
    margin-bottom: 30px;
}

button#toggleBtn, button#calcToggleBtn {
    background-color: #4a90e2;
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

button#toggleBtn:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

/* 結果表示エリア */
.result {
    margin-top: 20px;
    padding: 20px;
    background-color: #ebf4ff; /* 薄い青 */
    border-radius: 12px;
    color: #2a4365;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.6;
}

/* 区切り線 */
hr {
    border: 0;
    height: 1px;
    background: #edf2f7;
    margin: 40px 0;
}

/* 非表示設定 */
.hidden {
    display: none;
}

/* input-group 内の flex-row に限定してスタイルを適用 */
.input-group > .flex-row {
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
    gap: 10px;           /* 要素同士の間隔 */
    width: 100%;
}

/* 影響を限定：flex-row の中にある入力要素だけを auto 幅にする */
.input-group > .flex-row input, 
.input-group > .flex-row select {
    width: auto;
    flex: 1; /* 横幅を柔軟に埋める */
}

/* 年数入力などは少し幅を詰めたい場合の微調整 */
#jpYearInput, #daysInput {
    max-width: 100px;
}

/* セレクトボックスと数字入力の比率を調整 */
#eraSelect {
    flex: 2; /* 元号選択を少し広めに */
    min-width: 120px;
}

#jpYearInput {
    flex: 2; /* 数字入力は少し狭めに */
    min-width: 80px;
    text-align: right; /* 数字を右寄せにすると綺麗 */
}

/* 「年」という文字のスタイル */
.unit {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4a5568;
    white-space: nowrap; /* 改行させない */
}



#targetDate {
    background-color: #fffde7; /* 基準日だとわかりやすいよう、わずかに色を変える（任意） */
    border-style: dashed; /* 少し控えめな印象に */
}

#targetDate:focus {
    background-color: #ffffff;
    border-style: solid;
}