/* ============================================================
   깨알도구
   우리 아이 성장 비교
   tool.css
   ============================================================ */

.tool-page {
  --tool-page-max-width: 980px;
}

.growth-calculator {
  align-items: start;
}

/* ============================================================
   SEX
   ============================================================ */

.growth-sex-options {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 7px;
}

.growth-sex-option {
  cursor: pointer;
}

.growth-sex-option input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}

.growth-sex-option span {
  display: flex;

  align-items: center;
  justify-content: center;

  min-height: 46px;

  border: 1px solid var(--line);

  border-radius: 10px;

  background: #fff;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.growth-sex-option input:checked + span {
  border-color: var(--brand);

  background: var(--surface-soft);
}

.growth-sex-option input:focus-visible + span {
  outline: 2px solid var(--brand);

  outline-offset: 2px;
}

/* ============================================================
   DATE / BODY GRID
   ============================================================ */

.growth-date-grid,
.growth-body-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 8px;
}

.body-title {
  margin-top: 5px;
}

/* ============================================================
   TOP RESULT
   ============================================================ */

.growth-result-top {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;
}

.growth-age {
  margin-top: 4px;

  color: var(--brand);

  font-size: 26px;

  font-weight: 900;

  letter-spacing: -1px;
}

.growth-sex-badge {
  flex: 0 0 auto;

  min-height: 27px;

  padding: 0 10px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: var(--surface-soft);

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

/* ============================================================
   RESULT CARD
   ============================================================ */

.growth-result-card {
  margin-top: 12px;

  padding: 13px;

  border: 1px solid var(--line);

  border-radius: 12px;

  background: #fff;
}

.growth-card-head {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 9px;
}

.growth-card-head > div {
  display: flex;

  align-items: center;

  gap: 5px;
}

.growth-card-head strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.growth-card-icon {
  font-size: 14px;
}

/* ============================================================
   CURRENT VALUE
   ============================================================ */

.growth-current-value {
  display: flex;

  align-items: baseline;

  gap: 4px;

  margin-top: 10px;
}

.growth-current-value strong {
  color: var(--brand);

  font-size: 26px;

  line-height: 1;

  font-weight: 900;

  letter-spacing: -1px;
}

.growth-current-value span {
  color: var(--text-soft);

  font-size: 12px;

  font-weight: 700;
}

/* ============================================================
   DIFF BADGE
   ============================================================ */

.growth-diff-badge,
.growth-bmi-badge {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 24px;

  padding: 0 8px;

  border-radius: 999px;

  background: var(--surface-soft);

  color: var(--text);

  font-size: 12px;

  font-weight: 900;

  white-space: nowrap;
}

.growth-diff-badge.positive {
  background: #eef5ea;

  color: #506b48;
}

.growth-diff-badge.negative {
  background: #edf4f8;

  color: #526c7a;
}

.growth-diff-badge.neutral {
  background: var(--surface-soft);

  color: var(--text-soft);
}

.growth-bmi-badge.underweight {
  background: #edf4f8;

  color: #526c7a;
}

.growth-bmi-badge.healthy {
  background: #eef6e9;

  color: #506b48;
}

.growth-bmi-badge.overweight {
  background: #faf4dc;

  color: #78652d;
}

.growth-bmi-badge.obesity {
  background: #faece6;

  color: #855148;
}

/* ============================================================
   STANDARD ROW
   ============================================================ */

.growth-standard-row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-top: 9px;

  padding: 8px 9px;

  border-radius: 9px;

  background: var(--surface-soft);
}

.growth-standard-row span {
  color: var(--text-soft);

  font-size: 12px;
}

.growth-standard-row strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;

  text-align: right;
}

/* ============================================================
   COMPARISON TRACK
   ============================================================ */

.growth-compare-track {
  margin-top: 14px;
}

.growth-track-line {
  position: relative;

  height: 8px;

  border-radius: 999px;

  background: #eeece5;
}

.growth-standard-mark {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 2px;
  height: 16px;

  transform: translate(-50%, -50%);

  background: var(--text-soft);
}

.growth-current-mark {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 13px;
  height: 13px;

  transform: translate(-50%, -50%);

  border: 3px solid #fff;

  border-radius: 50%;

  background: var(--brand);

  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);

  transition: left 0.25s ease;
}

.growth-track-label {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 8px;

  margin-top: 5px;

  color: var(--text-soft);

  font-size: 12px;
}

.growth-track-label strong {
  color: var(--text-soft);

  font-size: 12px;
}

/* ============================================================
   DESCRIPTION
   ============================================================ */

.growth-card-description {
  margin-top: 9px;

  color: var(--text-soft);

  font-size: 12px;

  line-height: 1.55;
}

/* ============================================================
   BMI RANGE
   ============================================================ */

.growth-bmi-ranges {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 5px;

  margin-top: 11px;
}

.growth-bmi-ranges > div {
  min-width: 0;

  padding: 8px 5px;

  border-radius: 9px;

  background: var(--surface-soft);

  text-align: center;
}

.growth-bmi-ranges span {
  display: block;

  color: var(--text-soft);

  font-size: 12px;
}

.growth-bmi-ranges strong {
  display: block;

  margin-top: 3px;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

/* ============================================================
   SUMMARY
   ============================================================ */

.growth-summary-box {
  margin-top: 12px;

  padding: 11px 12px;

  border-radius: 11px;

  background: var(--surface-soft);
}

.growth-summary-box > strong {
  display: block;

  margin-bottom: 5px;

  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.growth-summary-box > div {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  min-height: 27px;
}

.growth-summary-box span {
  color: var(--text-soft);

  font-size: 12px;
}

.growth-summary-box b {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;

  text-align: right;
}

/* ============================================================
   GUIDE
   ============================================================ */

.growth-guide-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 8px;

  margin-top: 12px;
}

/* ============================================================
   SOURCE NOTE
   ============================================================ */

.growth-source-note {
  margin-top: 13px;

  padding: 12px;

  border-radius: 10px;

  background: var(--surface-soft);
}

.growth-source-note strong {
  color: var(--text);

  font-size: 12px;

  font-weight: 900;
}

.growth-source-note p {
  margin: 5px 0 0;

  color: var(--text-soft);

  font-size: 12px;

  line-height: 1.65;
}

.growth-source-note a {
  display: inline-block;

  margin-top: 8px;

  color: var(--brand);

  font-size: 12px;

  font-weight: 900;

  text-decoration: none;
}

.growth-source-note a:hover {
  text-decoration: underline;
}

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 820px) {
  .growth-calculator {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 560px) {
  .growth-date-grid,
  .growth-body-grid {
    grid-template-columns: 1fr;
  }

  .growth-age {
    font-size: 23px;
  }

  .growth-guide-grid {
    grid-template-columns: 1fr;
  }

  .growth-current-value strong {
    font-size: 24px;
  }

  .growth-diff-badge,
  .growth-bmi-badge {
    font-size: 12px;
  }

  .growth-bmi-ranges span {
    font-size: 12px;
  }

  .growth-bmi-ranges strong {
    font-size: 12px;
  }
}

/* ============================================================
   VERY SMALL
   ============================================================ */

@media (max-width: 380px) {
  .growth-bmi-ranges {
    grid-template-columns: 1fr;
  }

  .growth-bmi-ranges > div {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 7px 9px;

    text-align: left;
  }

  .growth-bmi-ranges strong {
    margin-top: 0;
  }
}
