:root {
  --bg: #f6f7f8;
  --card: #ffffff;
  --ink: #15191e;
  --muted: #5d6670;
  --line: #dde1e5;
  --accent: #0b6e4f;
  --accent-soft: #e3f2ec;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111417;
    --card: #1a1e22;
    --ink: #e8eaed;
    --muted: #9aa3ad;
    --line: #2d3339;
    --accent: #4cc596;
    --accent-soft: #173328;
    --bad: #ff8a80;
    --bad-soft: #3a1d1b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--accent);
}

h1 { margin: 4px 0 4px; font-size: 28px; line-height: 1.2; }
h2 { font-size: 17px; margin: 32px 0 8px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.message {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  white-space: pre-line;
}

.problem {
  background: var(--bad-soft);
  color: var(--bad);
  border-radius: 10px;
  padding: 12px 16px;
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
  padding: 40px 20px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--card);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-title { font-size: 19px; font-weight: 600; }

.files { list-style: none; margin: 16px 0 0; padding: 0; }

.files li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.row { display: flex; align-items: baseline; gap: 12px; }
.name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.state { font-size: 14px; color: var(--muted); white-space: nowrap; }
.state.done { color: var(--accent); font-weight: 600; }
.state.bad { color: var(--bad); }

.bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s;
}

button.cancel {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

button.cancel:hover { color: var(--bad); }

footer { margin-top: 48px; }
