:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #6b6b6b;
  --rule: #d4d4d4;
  --accent: #1a1a1a;
  --accent-hover: #2e2e2e;
  --accent-soft: #f3f3f3;
  --error: #8a1c1c;
  --ok: #1c5a2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header {
  margin-bottom: 48px;
}

header h1 {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  color: var(--ink);
}

.rule {
  width: 80px;
  height: 1px;
  background: var(--accent);
  margin: 0;
}

.zone {
  border: 1.5px dashed var(--rule);
  border-radius: 2px;
  padding: 56px 32px;
  text-align: center;
  background: var(--bg);
  transition: border-color 180ms ease, background 180ms ease;
  position: relative;
  cursor: pointer;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zone:hover,
.zone.dragover {
  border-color: var(--accent);
  background: #fafafa;
}

.zone .state {
  display: none;
  width: 100%;
}

body[data-state="idle"] .zone .state.idle,
body[data-state="processing"] .zone .state.processing,
body[data-state="done"] .zone .state.done,
body[data-state="error"] .zone .state.error {
  display: block;
}

body[data-state="processing"] .zone,
body[data-state="done"] .zone,
body[data-state="error"] .zone {
  cursor: default;
}

.arrow,
.check,
.cross {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 300;
}

.check { color: var(--ok); }
.cross { color: var(--error); font-size: 2.5rem; }

.prompt {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--ink);
}

.prompt-sub {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 20px;
  border: 2px solid var(--rule);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 0.9375rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
  margin: 4px 4px 0;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

footer p {
  margin: 4px 0;
}

@media (max-width: 480px) {
  main { padding: 32px 16px; }
  .zone { padding: 40px 20px; }
}
