* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
  padding: 16px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #555;
}

h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #555;
}

.input-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#survey-title {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.input-row input[type="text"] {
  flex: 2;
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.input-row input[type="number"] {
  flex: 1;
  min-width: 80px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

#add-btn {
  padding: 10px 20px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}

#add-btn:hover {
  background: #2980b9;
}

.results-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.clear-btn {
  padding: 6px 14px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.clear-btn:hover {
  background: #c0392b;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.results-table th,
.results-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.results-table th {
  background: #f8f9fa;
  color: #666;
  font-weight: 600;
}

.results-table td:last-child {
  text-align: center;
}

.delete-btn {
  padding: 4px 10px;
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.delete-btn:hover {
  background: #e74c3c;
  color: #fff;
}

.pct-bar {
  display: inline-block;
  height: 12px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
  min-width: 4px;
}

.graph-area {
  margin-top: 10px;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 480px) {
  h1 { font-size: 1.2rem; }
  .input-row { flex-direction: column; }
  .input-row input[type="text"],
  .input-row input[type="number"] { min-width: 100%; }
}
