:root {
  color-scheme: light dark;
  --border: color-mix(in srgb, currentColor 25%, transparent);
}

body {
  font-family: system-ui, sans-serif;
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.5;
}

h1 {
  font-size: 1.3rem;
}

.hint {
  font-size: 0.85rem;
  opacity: 0.7;
}

.field {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

input[type="text"],
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: inherit;
}

textarea {
  resize: vertical;
}

.fuzzy {
  position: relative;
}

.fuzzy-list {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 220px;
  overflow-y: auto;
  background: Canvas;
}

.fuzzy-list li {
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.fuzzy-list li.active,
.fuzzy-list li:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.chips {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
}

.chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
}

.paste-area {
  border: 2px dashed var(--border);
  border-radius: 6px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: text;
  font-size: 0.95rem;
}

.paste-area:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

#image-preview-wrap {
  margin-top: 0.6rem;
  max-height: 240px;
  overflow: hidden;
  border-radius: 4px;
  line-height: 0;
}

#image-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
}

button#submit-btn {
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}

button#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
