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

#app {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px;
}

#app-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #1565C0;
  margin: 0 0 24px 0;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#mode-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#mode-label {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

#mode-buttons {
  display: flex;
  gap: 8px;
}

.mode-btn {
  padding: 8px 20px;
  border: 2px solid #1565C0;
  border-radius: 24px;
  background: #fff;
  color: #1565C0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  background: #E3F2FD;
}

.mode-btn.active {
  background: #1565C0;
  color: #fff;
}

#input-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.input-group label {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: #1565C0;
}

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

.input-wrapper input::placeholder {
  color: #BDBDBD;
  font-size: 15px;
}

.unit {
  font-size: 15px;
  color: #757575;
  white-space: nowrap;
  padding-left: 8px;
}

#tier-label {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

#tier-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #F5F9FF;
  border-radius: 12px;
  flex-wrap: wrap;
}

.tier-num {
  font-weight: 700;
  color: #1565C0;
  font-size: 14px;
  min-width: 48px;
}

.tier-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  padding: 0 8px;
  flex: 1;
  min-width: 100px;
  background: #fff;
  transition: border-color 0.2s;
}

.tier-input-wrapper:focus-within {
  border-color: #1565C0;
}

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

.tier-input-wrapper input::placeholder {
  color: #BDBDBD;
  font-size: 13px;
}

.tier-input-wrapper .unit {
  font-size: 13px;
}

#tier-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-secondary {
  padding: 8px 16px;
  border: 1.5px solid #E0E0E0;
  border-radius: 8px;
  background: #FAFAFA;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #E3F2FD;
  border-color: #1565C0;
  color: #1565C0;
}

#result-area {
  text-align: center;
}

#result-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

#result-value-wrapper {
  margin-bottom: 16px;
}

#result-currency {
  font-size: 24px;
  font-weight: 700;
  color: #1565C0;
}

#result-value {
  font-size: 40px;
  font-weight: 800;
  color: #1565C0;
  transition: all 0.3s;
}

#result-detail {
  overflow-x: auto;
  margin-bottom: 16px;
}

#detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#detail-table th,
#detail-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid #F0F0F0;
}

#detail-table thead th {
  background: #F5F9FF;
  color: #555;
  font-weight: 600;
  font-size: 13px;
}

#detail-table tbody td {
  color: #333;
}

#result-actions {
  display: flex;
  justify-content: center;
}

.btn-primary {
  padding: 10px 32px;
  border: none;
  border-radius: 8px;
  background: #1565C0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #0D47A1;
}

#features,
#scenarios,
#FAQ {
  max-width: 800px;
  margin: 0 auto 16px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

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

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

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

#FAQ dl {
  margin: 0;
}

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

#FAQ dd {
  font-size: 14px;
  color: #555;
  margin: 4px 0 0 0;
  line-height: 1.6;
}

@media (max-width: 600px) {
  #app {
    padding: 16px 12px;
  }

  #app-title {
    font-size: 24px;
  }

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

  .tier-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tier-num {
    min-width: auto;
  }

  #tier-actions {
    flex-direction: column;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  #app {
    padding: 20px 16px;
  }
}
