* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #FAFAF8;
  color: #1A1A18;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.topbar {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.wordmark {
  display: block;
  height: 18px;
  width: auto;
  margin: 0 auto;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.hero {
  text-align: center;
  margin-bottom: 72px;
}

.hero h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.25;
}

.subtitle {
  font-size: 15px;
  color: #6B6B66;
  margin: 0;
}

.upload-zone {
  margin-bottom: 56px;
}

.upload-zone h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.hint {
  font-size: 13px;
  color: #6B6B66;
  margin: 0 0 16px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #D5D5D0;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 40px 24px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  text-align: center;
}

.dropzone:hover {
  border-style: solid;
  border-color: #1A1A18;
}

.dropzone.dragover {
  border-style: solid;
  border-color: #1A1A18;
}

.dropzone-icon {
  color: #6B6B66;
}

.dropzone-text {
  font-size: 14px;
  color: #6B6B66;
}

.error-msg {
  color: #B42318;
  font-size: 13px;
  margin: 10px 0 0;
}

.error-msg:empty {
  margin: 0;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E5E5E0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb .remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(26, 26, 24, 0.75);
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.thumb:hover .remove-btn,
.thumb .remove-btn:focus-visible {
  opacity: 1;
}

.thumb .remove-btn:hover {
  background: #1A1A18;
}

.submit-area {
  margin-top: 8px;
}

#submit-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: #1A1A18;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#submit-btn:focus-visible {
  outline: 2px solid #1A1A18;
  outline-offset: 2px;
}

#submit-btn:disabled {
  background-color: #E5E5E0;
  color: #A0A09A;
  cursor: not-allowed;
}

#submit-btn:not(:disabled):hover {
  background-color: #333330;
}

.limit-note {
  font-size: 13px;
  color: #6B6B66;
  text-align: center;
  margin: 10px 0 0;
}

.progress-bar {
  height: 3px;
  margin-top: 12px;
  border-radius: 10px;
  background: #E5E5E0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 10px;
  background: #1A1A18;
  animation: indeterminate 1.4s ease-in-out infinite;
}

@keyframes indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

#results {
  margin-top: 72px;
}

#results:empty {
  margin: 0;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #6B6B66;
}

.pill-toggle {
  display: flex;
  gap: 6px;
}

.pill {
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #1A1A18;
  background: #FFFFFF;
  border: 1px solid #E5E5E0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pill:hover {
  border-color: #1A1A18;
}

.pill.active {
  color: #FFFFFF;
  background: #1A1A18;
  border-color: #1A1A18;
}

.result-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #E5E5E0;
}

.result-summary {
  margin: 28px 0 0;
}

.result-section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B6B66;
  margin: 40px 0 12px;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
}

.result-row-secondary {
  color: #6B6B66;
}

.result-row-icon {
  flex-shrink: 0;
  position: relative;
  top: 2px;
  color: #1A1A18;
}

.result-row-secondary .result-row-icon {
  color: #6B6B66;
}

.feedback-block {
  margin-top: 40px;
}

.feedback-thumbs {
  display: flex;
  gap: 8px;
}

.thumb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 8px 0;
  color: #1A1A18;
  background: #FFFFFF;
  border: 1px solid #E5E5E0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.thumb-pill:hover {
  border-color: #1A1A18;
}

.thumb-pill.selected {
  color: #FFFFFF;
  background: #1A1A18;
  border-color: #1A1A18;
}

.thumb-pill.dimmed {
  opacity: 0.4;
}

.feedback-form {
  margin-top: 18px;
}

.feedback-form-label {
  display: block;
  font-size: 13px;
  color: #6B6B66;
  margin-bottom: 8px;
}

.feedback-textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #1A1A18;
  background: #FFFFFF;
  border: 1px solid #E5E5E0;
  border-radius: 10px;
  resize: vertical;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #1A1A18;
}

.feedback-send {
  margin-top: 10px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  background: #1A1A18;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.feedback-send:hover {
  background: #333330;
}

.feedback-thanks {
  font-size: 14px;
  color: #6B6B66;
  margin: 0;
}

.dev-data {
  margin-top: 48px;
}

.dev-data summary {
  font-size: 13px;
  color: #6B6B66;
  cursor: pointer;
}

.dev-data pre {
  margin: 12px 0 0;
  padding: 20px;
  background-color: #FFFFFF;
  border: 1px solid #E5E5E0;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.secondary-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #1A1A18;
  background: #FFFFFF;
  border: 1px solid #E5E5E0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.secondary-btn:hover {
  border-color: #1A1A18;
}
