html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

#app {
  max-width: 600px;
  margin: 20px auto;
  padding: 0 16px;
}

#app-title {
  text-align: center;
  font-size: 24px;
  color: #2c3e50;
  margin: 16px 0 20px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 24px;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  font-weight: 500;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: #4A90D9;
}

.input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 16px;
  color: #333;
  background: transparent;
  min-width: 0;
}

.input-wrapper input::placeholder {
  color: #bbb;
}

.input-wrapper .unit {
  padding: 0 14px;
  font-size: 14px;
  color: #888;
  background: #f5f5f5;
  height: 44px;
  line-height: 44px;
  white-space: nowrap;
  border-left: 1px solid #eee;
}

.button-group {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #4A90D9;
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: #f0f0f0;
  color: #555;
}

.btn-secondary:hover {
  background: #e4e4e4;
}

.result-area {
  text-align: center;
  padding: 20px 0 0;
  border-top: 1px solid #eee;
  min-height: 120px;
}

.result-bmi {
  margin-bottom: 12px;
}

#bmi-label {
  display: block;
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

.bmi-value {
  font-size: 48px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

#bmi-unit {
  display: block;
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}

.result-category {
  margin: 8px 0;
  font-size: 16px;
}

.category-value {
  font-weight: 600;
  font-size: 20px;
}

#category-label {
  color: #777;
}

.result-description {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
  line-height: 1.6;
}

.bmi-scale {
  display: flex;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  gap: 6px;
}

.scale-item {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 12px;
  color: #999;
  background: #f8f8f8;
  transition: all 0.3s;
}

.scale-item span {
  display: block;
}

.scale-item span:first-child {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
}

.scale-underweight.active {
  background: #4A90D9;
  color: #fff;
}

.scale-normal.active {
  background: #27AE60;
  color: #fff;
}

.scale-overweight.active {
  background: #E67E22;
  color: #fff;
}

.scale-obese.active {
  background: #E74C3C;
  color: #fff;
}

#features, #scenarios, #FAQ {
  max-width: 600px;
  margin: 32px auto;
  padding: 0 16px;
}

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 12px;
}

#features p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
}

#scenarios ul {
  padding-left: 20px;
}

#scenarios li {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 6px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-top: 16px;
  margin-bottom: 6px;
}

#FAQ dd {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-left: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

#__fork {
  text-align: center;
  margin: 20px 0;
}

#__fork button {
  padding: 10px 24px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

#__fork button:hover {
  border-color: #4A90D9;
  color: #4A90D9;
}

.page-info {
  text-align: center;
  padding: 20px 16px;
  font-size: 12px;
  color: #aaa;
}

.page-info a {
  color: #888;
  text-decoration: none;
}

.page-info a:hover {
  color: #4A90D9;
  text-decoration: underline;
}

@media (max-width: 600px) {
  #app-title {
    font-size: 20px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .bmi-value {
    font-size: 40px;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .bmi-scale {
    gap: 4px;
  }

  .scale-item {
    padding: 8px 2px;
    font-size: 11px;
  }

  .scale-item span:first-child {
    font-size: 11px;
  }
}
