/* ------------------------------
   共通設定
   ------------------------------ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 95%;
  max-width: 720px;
  min-height: 100vh; /* 画面全体の高さを確保 */
  margin: 0 auto; /* 上下マージンをリセット */
  display: flex; /* フレックスボックス化 */
  flex-direction: column; /* 縦並びの軸を設定 */
  justify-content: center; /* 上下方向の中央配置 */
  align-items: center; /* 左右方向の中央配置 */
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #cbd5e0; 
  color: #333a42;
}

/* ------------------------------
   メインコンテナ
   ------------------------------ */
.Ui-Container {
  width: 100%; /* body内で潰れないよう幅を100%に固定 */
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;

/* 病院っぽく上品に浮かび上がらせる柔らかい影を追加 */
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.01);
}

/* ------------------------------
   タイトルエリア
   ------------------------------ */
.title-area {
  padding: 10px;
  text-align: center;
  border-bottom: 2px solid #edf2f7;
}
.title-area h1 {
  font-size: 24px;
  color: #2d3748;
}
.title-area p {
  margin-top: 8px;
  font-size: 14px;
  color: #718096;
}

/* ------------------------------
   フィールドエリア
   ------------------------------ */
.field-area {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 15px;
  font-weight: bold;
  color: #4a5568;
}
.form-group select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  background-color: #fafbfc;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  cursor: pointer;
}

/* ------------------------------
   リザルトエリア
   ------------------------------ */
.result-area {
  padding: 10px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  animation: fadeIn 0.3s ease-in-out;
}
.result-area h2 {
  padding-bottom: 5px;
  margin-bottom: 20px;
  font-size: 18px;
  color: #2d3748;
  border-bottom: 2px solid #cbd5e0;
}

/* ------------------------------
   カレントステータスパネル
   ------------------------------ */
.current-status {
  padding: 20px;
  margin-bottom: 25px;
  background-color: #f1f5f9;
  border-left: 4px solid #64748b;
  border-radius: 0 6px 6px 0;
}
.bmi-score span {
  font-size: 14px;
  color: #64748b;
}
.bmi-score .bmi-value {
  font-size: 36px;
  color: #1e293b;
}
.status-text {
  margin-top: 10px;
  font-size: 15px;
  font-weight: bold;
}

/* ------------------------------
   ウエイトターゲットリスト
   ------------------------------ */
.weight-targets h3 {
  margin-bottom: 12px;
  font-size: 16px;
  color: #4a5568;
}
.target-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.weight-targets .target-row {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  padding: 12px 15px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  opacity: 0.4;
  transition: all 0.2s ease;
}
.target-name {
  font-size: 14px;
  font-weight: bold;
  color: #718096;
}
.target-value strong {
  font-size: 18px;
  color: #718096;
}
.diff-value {
  margin-left: 10px;
  font-size: 12px;
  font-weight: bold;
}

/* ------------------------------
   アクティブハイライト状態
   ------------------------------ */
.weight-targets .target-row.is-exceeded {
  background: #f0fdf4;
  border-color: #bbf7d0;
  opacity: 1;
}
.is-exceeded .target-name { color: #166534; }
.is-exceeded .target-value strong { color: #166534; }
.is-exceeded .diff-value { color: #16a34a; }

.weight-targets .target-row.is-exceeded.obese {
  background: #fef2f2;
  border-color: #fee2e2;
}
.obese.is-exceeded .target-name { color: #b91c1c; }
.obese.is-exceeded .target-value strong { color: #b91c1c; }
.obese.is-exceeded .diff-value { color: #dc2626; }

/* ------------------------------
   アニメーション定義
   ------------------------------ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------
   レスポンシブ設定（スマホ表示）
   ------------------------------ */
@media (max-width: 580px) {
  html {
    font-size: 0.625rem;
  }
  .Ui-Container {
    padding: 10px;
  }
}