/* ── BMI 계산기 ── */
:root {
  --blue:   #2563eb;
  --blue2:  #1d4ed8;
  --sky:    #eff6ff;
  --sky2:   #dbeafe;
  --ink:    #1e293b;
  --muted:  #64748b;
  --line:   #e2e8f0;
  --bg:     #f8fafc;
  --radius: 14px;
  --radius2:10px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);

  --c-under:  #06b6d4; /* 저체중 */
  --c-normal: #16a34a; /* 정상 */
  --c-over:   #f97316; /* 과체중 */
  --c-obese:  #ef4444; /* 비만 */
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; }
.wrap { max-width: 100%; padding: 0 0 60px; }

/* ── 헤더 ── */
.top { padding: 20px 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 48px; height: 48px; border-radius: var(--radius2);
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.brand h1 { font-size: 22px; font-weight: 700; }
.brand .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── 카드 ── */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }

/* ── 입력 그리드 ── */
.input-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px;
}
@media (max-width: 480px) { .input-grid { grid-template-columns: 1fr; } }

.input-group label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.input-with-unit { display: flex; align-items: center; gap: 0; }
.input-with-unit input {
  flex: 1; height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius2) 0 0 var(--radius2);
  font-size: 16px; font-weight: 700; color: var(--ink); outline: none;
  transition: border-color .15s;
}
.input-with-unit input:focus { border-color: var(--blue); }
.unit-badge {
  height: 44px; padding: 0 12px; display: flex; align-items: center;
  background: var(--sky); border: 1.5px solid var(--line); border-left: none;
  border-radius: 0 var(--radius2) var(--radius2) 0;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}

/* 성별 선택 */
.gender-row { display: flex; gap: 8px; }
.gender-btn {
  flex: 1; height: 44px; border: 1.5px solid var(--line);
  border-radius: var(--radius2); background: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s;
  color: var(--muted);
}
.gender-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.full { grid-column: 1 / -1; }

/* ── 계산 버튼 ── */
.btn-calc {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, var(--blue), #7c3aed);
  border: none; border-radius: var(--radius2);
  color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: opacity .15s;
}
.btn-calc:hover { opacity: .88; }

/* ── 결과 카드 ── */
.result-display {
  display: none; text-align: center; padding: 24px;
  background: var(--sky); border: 1px solid var(--sky2);
  border-radius: var(--radius2); margin-top: 14px;
}
.result-display.show { display: block; }
.bmi-number { font-size: 52px; font-weight: 900; letter-spacing: -2px; }
.bmi-label { font-size: 18px; font-weight: 700; margin-top: 4px; }
.bmi-range { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ── BMI 게이지 바 ── */
.bmi-gauge {
  margin: 16px 0 0; height: 12px; border-radius: 6px; position: relative;
  background: linear-gradient(to right, #06b6d4 0%, #16a34a 25%, #f97316 65%, #ef4444 100%);
}
.bmi-needle {
  position: absolute; top: -4px; width: 4px; height: 20px;
  background: var(--ink); border-radius: 2px;
  transform: translateX(-50%); transition: left .5s ease;
}
.gauge-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted); margin-top: 4px;
}

/* ── 분류 테이블 ── */
.bmi-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.bmi-table th, .bmi-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.bmi-table th { font-size: 11px; color: var(--muted); font-weight: 600; }
.bmi-table tr.highlight td { font-weight: 700; background: var(--sky); }
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
}

/* ── 정상 체중 범위 ── */
.normal-range {
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--radius2); padding: 14px; margin-top: 10px;
  font-size: 13px; color: #14532d; text-align: center; line-height: 1.7;
}
.normal-range strong { font-size: 16px; color: #16a34a; }

/* ── 사용 안내 ── */
.guide-section {
  margin-top: 24px; background: rgba(246,248,255,.6);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.guide-section h2 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--ink); }
.guide-section h2:not(:first-child) { margin-top: 18px; }
.guide-steps, .guide-features, .guide-usecase {
  margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.8;
}
.guide-steps li, .guide-features li, .guide-usecase li { margin-bottom: 4px; }
.guide-steps strong, .guide-features strong { color: var(--ink); }
.guide-privacy {
  margin-top: 16px; background: #eff6ff; border: 1px solid rgba(37,99,235,.22);
  border-radius: 12px; padding: 12px 14px; font-size: 12px; color: #1e40af; line-height: 1.55;
}
