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

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

#app-header {
  text-align: center;
  margin-bottom: 28px;
}

#app-title {
  font-size: 28px;
  font-weight: 700;
  color: #2E7D32;
  margin: 0 0 8px 0;
}

#app-subtitle {
  font-size: 15px;
  color: #666;
  margin: 0;
}

#calculator {
  background: #f9fbf9;
  border: 1px solid #e0e8e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.input-group label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #444;
  margin-bottom: 10px;
}

#weight-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#weight-input {
  width: 140px;
  height: 44px;
  font-size: 18px;
  text-align: center;
  border: 2px solid #c8d6c8;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  padding: 0 8px;
  box-sizing: border-box;
}

#weight-input:focus {
  border-color: #4CAF50;
}

.toggle-group {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #c8d6c8;
}

.toggle-btn {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:first-child {
  border-right: 1px solid #c8d6c8;
}

.toggle-btn.active {
  background: #4CAF50;
  color: #fff;
}

.toggle-btn:hover:not(.active) {
  background: #e8f5e9;
}

#activity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-btn {
  flex: 1 1 auto;
  min-width: 90px;
  padding: 10px 12px;
  font-size: 14px;
  border: 2px solid #c8d6c8;
  border-radius: 8px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.activity-btn:hover:not(.active) {
  background: #e8f5e9;
  border-color: #4CAF50;
}

.activity-btn.active {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

#result-section {
  background: #fff;
  border: 1px solid #e0e8e0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

#result-title {
  font-size: 17px;
  font-weight: 600;
  color: #2E7D32;
  margin: 0 0 16px 0;
  text-align: center;
}

#result-main {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

#result-value-section {
  text-align: center;
}

#result-value {
  font-size: 48px;
  font-weight: 700;
  color: #4CAF50;
  line-height: 1;
}

#result-unit {
  display: block;
  font-size: 16px;
  color: #888;
  margin-top: 4px;
}

#result-per-kg-section {
  text-align: center;
  padding: 12px 16px;
  background: #f1f8f1;
  border-radius: 8px;
}

#result-per-kg-label {
  font-size: 14px;
  color: #666;
}

#result-per-kg-value {
  font-size: 28px;
  font-weight: 600;
  color: #388E3C;
  margin: 0 4px;
}

#result-per-kg-unit {
  font-size: 14px;
  color: #888;
}

#result-bar-section {
  margin-top: 8px;
}

#result-bar-bg {
  width: 100%;
  height: 10px;
  background: #e8f5e9;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 6px;
}

#result-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #66BB6A, #4CAF50, #388E3C);
  border-radius: 5px;
  transition: width 0.4s ease;
}

#result-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

#reset-section {
  text-align: center;
}

#reset-btn {
  padding: 10px 32px;
  font-size: 15px;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  background: #fff;
  color: #4CAF50;
  cursor: pointer;
  transition: all 0.2s;
}

#reset-btn:hover {
  background: #4CAF50;
  color: #fff;
}

#food-section {
  background: #f9fbf9;
  border: 1px solid #e0e8e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

#food-title {
  font-size: 20px;
  font-weight: 700;
  color: #2E7D32;
  margin: 0 0 8px 0;
}

#food-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 18px 0;
  line-height: 1.5;
}

#food-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.food-card {
  background: #fff;
  border: 1px solid #e0e8e0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s;
}

.food-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.food-icon {
  font-size: 28px;
  line-height: 1;
}

.food-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.food-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.food-protein {
  font-size: 13px;
  font-weight: 600;
  color: #4CAF50;
}

.food-bar-bg {
  width: 100%;
  height: 5px;
  background: #e8f5e9;
  border-radius: 3px;
  overflow: hidden;
}

.food-bar-fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 3px;
  transition: width 0.4s ease;
}

#__fork {
  text-align: center;
  margin-bottom: 24px;
}

#__fork button {
  padding: 10px 28px;
  font-size: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 20px;
  font-weight: 700;
  color: #2E7D32;
  margin: 0 0 12px 0;
}

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

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

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

#scenarios li strong {
  color: #333;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 14px 0 6px 0;
}

#FAQ dd {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 12px 0;
  padding-left: 12px;
  border-left: 3px solid #e8f5e9;
}

footer {
  text-align: center;
  padding: 20px 16px !important;
}

.page-info {
  font-size: 13px;
  color: #999;
}

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

.page-info a:hover {
  text-decoration: underline;
}

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

  #app {
    padding: 12px;
  }

  #calculator {
    padding: 16px;
  }

  #weight-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  #weight-input {
    width: 100%;
  }

  .toggle-group {
    width: 100%;
  }

  .toggle-btn {
    flex: 1;
    text-align: center;
  }

  #activity-options {
    flex-direction: column;
  }

  .activity-btn {
    min-width: unset;
  }

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

  #result-value {
    font-size: 40px;
  }

  #food-list {
    grid-template-columns: 1fr;
  }

  #food-section {
    padding: 16px;
  }
}
