:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1a1f29;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error: #b91c1c;
  --ok: #15803d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  background: var(--card);
  width: 100%;
  max-width: 560px;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

h1 {
  margin: 0 0 .25rem;
  font-size: 1.6rem;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

form { display: flex; flex-direction: column; gap: 1.25rem; }

.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-weight: 600; font-size: .95rem; }

input[type="file"],
input[type="text"] {
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

input[type="text"]:focus,
input[type="file"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.muted { color: var(--muted); font-size: .85rem; }

.presets {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.presets legend { padding: 0 .35rem; font-size: .9rem; color: var(--muted); }
.presets button {
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .75rem;
  font: inherit;
  cursor: pointer;
}
.presets button:hover { background: #e5e7eb; }

button.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .75rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover { background: var(--accent-hover); }
button.primary:disabled { opacity: .6; cursor: progress; }

#status { min-height: 1.25rem; margin: .25rem 0 0; font-size: .95rem; }
#status.error { color: var(--error); }
#status.ok { color: var(--ok); }

footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); }
