* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f5f5f5;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
}

h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 600;
}

.subtitle {
  margin: 0 0 20px;
  color: #555;
  font-size: 13px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.row label:first-child {
  flex: 0 0 180px;
  font-weight: 500;
}

.row input[type="file"],
.row select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.row input[type="file"] {
  max-width: 320px;
}

.output-preview {
  flex: 1;
  font-size: 13px;
  color: #555;
  font-style: italic;
}

.options {
  margin: 16px 0 8px;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}

.options legend {
  padding: 0 8px;
  font-weight: 600;
}

.options .row {
  padding: 4px 0;
}

.checkboxes {
  flex-wrap: wrap;
  gap: 8px 20px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input {
  margin: 0;
}

.actions {
  display: flex;
  gap: 10px;
  margin: 12px 0 8px;
}

.actions button {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #333;
  border-radius: 4px;
  background: #333;
  color: #fff;
  cursor: pointer;
}

.actions button:hover {
  background: #555;
  border-color: #555;
}

.actions button#btn-clear {
  background: #fff;
  color: #333;
}

.actions button#btn-clear:hover {
  background: #eee;
}

#log {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  resize: vertical;
  min-height: 120px;
}

#chart-select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.credit {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #666;
}

.credit a {
  color: #333;
  text-decoration: none;
}

.credit a:hover {
  text-decoration: underline;
}
