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

.calculator-container {
  max-width: 640px;
  margin: 20px auto;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.calculator-container h1 {
  text-align: center;
  font-size: 1.6rem;
  color: #1565c0;
  margin-bottom: 20px;
}

.trapezoid-diagram {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.trapezoid-diagram svg {
  max-width: 100%;
  height: auto;
}

.input-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.input-area .input-group:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.input-group input {
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.button-area {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.button-area button {
  padding: 10px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.button-area button:active {
  transform: scale(0.97);
}

#btn-calculate {
  background: #1976d2;
  color: #fff;
}

#btn-calculate:hover {
  background: #1565c0;
}

#btn-reset {
  background: #e0e0e0;
  color: #333;
}

#btn-reset:hover {
  background: #bdbdbd;
}

.result-area {
  background: #f5f9ff;
  border: 1px solid #e3edf7;
  border-radius: 10px;
  padding: 20px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.result-item + .result-item {
  margin-top: 8px;
}

.result-label {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
}

.result-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1976d2;
  margin: 0 8px;
}

.result-unit {
  font-size: 0.85rem;
  color: #999;
}

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

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 1.3rem;
  color: #1565c0;
  margin-bottom: 12px;
}

#features p {
  line-height: 1.8;
  color: #555;
}

#scenarios ul {
  padding-left: 20px;
  color: #555;
  line-height: 1.8;
}

#FAQ dl {
  color: #555;
}

#FAQ dt {
  font-weight: 600;
  color: #333;
  margin-top: 12px;
}

#FAQ dd {
  margin-left: 16px;
  margin-top: 4px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .calculator-container {
    margin: 10px;
    padding: 16px;
    border-radius: 8px;
  }

  .calculator-container h1 {
    font-size: 1.3rem;
  }

  .input-area {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .input-area .input-group:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .button-area {
    flex-direction: column;
    gap: 8px;
  }

  .button-area button {
    width: 100%;
  }

  .result-value {
    font-size: 1.4rem;
  }
}
