body {
  font-family: sans-serif;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  background: #fafafa;
  color: #222;
}

h1 {
  font-size: 1.4rem;
}

.capture-btn {
  display: block;
  text-align: center;
  background: #4caf50;
  color: white;
  padding: 14px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.capture-btn input {
  display: none;
}

#preview img {
  width: 100%;
  border-radius: 8px;
  margin-top: 12px;
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: #2196f3;
  color: white;
}

button:disabled {
  background: #bbb;
}

.hidden {
  display: none;
}

.error {
  color: #c62828;
}

#result {
  margin-top: 16px;
  background: white;
  padding: 12px;
  border-radius: 8px;
}

#history {
  list-style: none;
  padding: 0;
}

#history li {
  background: white;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.weight-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 10px 12px;
  border-radius: 8px;
}

.weight-input-row input {
  flex: 1;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
}

#weightSummary {
  font-size: 0.95rem;
  color: #444;
}

#weightChart {
  width: 100%;
  height: auto;
  background: white;
  border-radius: 8px;
  margin-top: 8px;
}
