* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  display: flex;
  justify-content: center;
  padding: 24px 12px;
}

.card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.app-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
}

.app-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
  color: #1a1a1a;
}

.beta-badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a7a4c;
  background: #e3f3ea;
  border-radius: 999px;
  padding: 2px 8px;
}

.subtitle {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.limit-notice {
  color: #888;
  font-size: 0.8rem;
  margin: 0 0 8px;
}

.disclaimer {
  color: #a15c00;
  background: #fff6e5;
  border-radius: 8px;
  font-size: 0.78rem;
  padding: 8px 10px;
  margin: 0 0 8px;
}

.ethics-note {
  color: #1a6b3c;
  background: #e3f3ea;
  border-radius: 8px;
  font-size: 0.78rem;
  padding: 8px 10px;
  margin: 0 0 20px;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 2px dashed #bbb;
  border-radius: 12px;
  cursor: pointer;
  padding: 16px;
  overflow: hidden;
}

.dropzone img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
}

#dropzone-text {
  color: #555;
  font-size: 0.9rem;
}

.focus-areas {
  text-align: left;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin: 14px 0 0;
}

.focus-areas legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  padding: 0 4px;
}

.focus-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #1a1a1a;
  padding: 5px 0;
  cursor: pointer;
}

.focus-option input {
  width: 16px;
  height: 16px;
  accent-color: #1a7a4c;
  cursor: pointer;
}

.settings-fields {
  text-align: left;
  margin-top: 10px;
}

.settings-hint {
  color: #777;
  font-size: 0.78rem;
  margin: 0 0 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-grid input {
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font-size: 0.85rem;
  min-width: 0;
}

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

button:disabled {
  background: #aaa;
  cursor: not-allowed;
}

#status {
  min-height: 1.2em;
  color: #444;
  font-size: 0.9rem;
}

#status a {
  color: #1a7a4c;
  font-weight: 600;
}

.good-for {
  margin-top: 14px;
}

.good-for-heading {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.good-for-bar {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.good-for-segment {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #999;
  background: #f4f4f4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.good-for-segment + .good-for-segment {
  border-left: 1px solid #ddd;
}

.good-for-segment.active {
  color: white;
  background: #1a7a4c;
}

.good-for-score {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

#result {
  margin-top: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  background: #f4f4f4;
  border-radius: 10px;
  padding: 14px 16px;
}

.result-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.result-card-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.score-badge {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a7a4c;
  background: #e3f3ea;
  border-radius: 999px;
  padding: 2px 10px;
}

.result-good,
.result-bad {
  font-size: 0.88rem;
  margin: 0 0 4px;
  line-height: 1.4;
}

.result-good {
  color: #1a6b3c;
}

.result-bad {
  color: #8a3a1a;
}
