@charset "utf-8";

.bmi-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.bmi-top {
  margin-bottom: 30px;
}

.bmi-main-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.bmi-input-card,
.bmi-result-card,
.bmi-scale-card {
  border: 1px solid #e5eaf3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.bmi-input-card,
.bmi-result-card {
  padding: 30px;
}

.bmi-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.bmi-card-head h2,
.bmi-scale-head h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.bmi-card-head p,
.bmi-scale-head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
}

.bmi-sample-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bmi-standard-box {
  margin-bottom: 18px;
}

.bmi-standard-select {
  min-height: 52px;
}

.bmi-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.bmi-input {
  min-height: 54px;
}

.bmi-check-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 20px;
  padding: 14px 16px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
}

.bmi-check-item input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.bmi-btn-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

.bmi-btn-row .utility-btn {
  width: 100%;
  min-height: 52px;
}

.bmi-result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.bmi-result-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  color: #2563eb;
}

.bmi-result-main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.bmi-result-number {
  font-size: 72px;
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
  color: #2563eb;
}

.bmi-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  max-width: 180px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.bmi-result-badge.is-empty {
  background: #eef2f7;
  color: #64748b;
}

.bmi-result-badge.is-under {
  background: #eef2ff;
  color: #3730a3;
}

.bmi-result-badge.is-normal {
  background: #dcfce7;
  color: #15803d;
}

.bmi-result-badge.is-over {
  background: #ffedd5;
  color: #c2410c;
}

.bmi-result-badge.is-obese {
  background: #fee2e2;
  color: #b91c1c;
}

.bmi-result-desc {
  min-height: 24px;
  margin: 0 0 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.bmi-mini-result-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.bmi-mini-result {
  min-width: 0;
  padding: 16px 14px;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.bmi-mini-result span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.bmi-mini-result strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
}

#idealWeight {
  font-size: 15px;
}

#bmiInputSummary {
  font-size: 15px;
}

.bmi-gauge-box {
  margin-bottom: 18px;
}

.bmi-gauge-track {
  position: relative;
  display: grid;
  grid-template-columns: 23% 31% 20% 26%;
  height: 14px;
  overflow: visible;
  border-radius: 999px;
  background: #e5e7eb;
}

.bmi-gauge-segment:first-child {
  border-radius: 999px 0 0 999px;
}

.bmi-gauge-segment:nth-child(4) {
  border-radius: 0 999px 999px 0;
}

.bmi-gauge-under {
  background: #c7d2fe;
}

.bmi-gauge-normal {
  background: #bbf7d0;
}

.bmi-gauge-over {
  background: #fed7aa;
}

.bmi-gauge-obese {
  background: #fecaca;
}

.bmi-gauge-marker {
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid #0f172a;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transition: left 0.2s ease, opacity 0.2s ease;
}

.bmi-gauge-marker.is-active {
  opacity: 1;
}

.bmi-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.bmi-message {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.bmi-message.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.bmi-message.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.bmi-message.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.bmi-message.is-info {
  border-color: #dbeafe;
  background: #f6f9ff;
  color: #475569;
}

.bmi-scale-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: center;
  padding: 28px 30px;
  margin-bottom: 36px;
}

.bmi-scale-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.bmi-scale-item {
  min-height: 92px;
  padding: 18px 12px;
  border: 1px solid;
  border-radius: 18px;
  text-align: center;
  transition: 0.18s ease;
}

.bmi-scale-item span {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.bmi-scale-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
  white-space: nowrap;
}

.bmi-scale-under {
  border-color: #c7d2fe;
  background: #f5f7ff;
}

.bmi-scale-normal {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.bmi-scale-over {
  border-color: #fed7aa;
  background: #fff7ed;
}

.bmi-scale-obese {
  border-color: #fecaca;
  background: #fef2f2;
}

.bmi-scale-item.is-active {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.bmi-help-layout {
  width: min(100%, 1060px);
  margin: 0 auto;
}

.bmi-help-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bmi-help-panel > h2 {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.bmi-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.bmi-help-grid .help-box {
  margin: 0;
  padding: 26px;
  border-radius: 22px;
}

.bmi-faq-grid {
  display: grid;
  gap: 16px;
}

.bmi-faq-grid .help-box {
  margin: 0;
  border-radius: 20px;
}

.bmi-faq-grid summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

@media (max-width: 1280px) {
  .bmi-page {
    padding-inline: 20px;
  }

  .bmi-main-grid {
    grid-template-columns: 1fr;
  }

  .bmi-result-card {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .bmi-scale-card {
    grid-template-columns: 1fr;
  }

  .bmi-scale-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bmi-help-layout {
    width: 100%;
  }

  .bmi-help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .bmi-page {
    padding-inline: 16px;
    padding-bottom: 52px;
  }

  .bmi-input-card,
  .bmi-result-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .bmi-card-head {
    flex-direction: column;
  }

  .bmi-form-grid,
  .bmi-btn-row,
  .bmi-mini-result-grid,
  .bmi-scale-list {
    grid-template-columns: 1fr;
  }

  .bmi-result-main {
    flex-direction: column;
    gap: 12px;
  }

  .bmi-result-number {
    font-size: 58px;
  }

  .bmi-mini-result strong,
  #idealWeight,
  #bmiInputSummary {
    white-space: normal;
  }

  .bmi-scale-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .bmi-help-grid .help-box {
    padding: 24px 20px;
  }
}