:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1c2430;
  --muted: #5a6677;
  --line: #d5dae2;
  --accent: #0b5cad;
  --accent-text: #ffffff;
  --good: #1a7f4b;
  --bad: #b3261e;
  --bad-bg: #fdecea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --panel: #1b212a;
    --text: #e8ecf1;
    --muted: #a3aebd;
    --line: #36404d;
    --accent: #5ea6ee;
    --accent-text: #0b1420;
    --good: #5ccf95;
    --bad: #ff9d96;
    --bad-bg: #3a1d1b;
  }
}

* { box-sizing: border-box; }

/* Author display rules (button, progress) would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

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

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px;
}

h1 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.panel > p:first-child { margin-top: 0; }

label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
}

input[type="email"],
input[type="text"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
}

button,
.button {
  display: inline-block;
  margin: 16px 8px 0 0;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

button[disabled] { opacity: 0.6; cursor: default; }

button.link {
  margin: 0;
  padding: 0;
  color: var(--accent);
  background: none;
  font-weight: 400;
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.message {
  margin: 0 0 16px;
  padding: 10px 14px;
  color: var(--bad);
  background: var(--bad-bg);
  border-radius: 6px;
}

.who { font-size: 0.95rem; overflow-wrap: anywhere; }

.drop {
  margin-top: 16px;
  padding: 24px 16px;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: 8px;
}

.drop.over { border-color: var(--accent); }
.drop p { margin: 0; }
.drop .button { margin: 12px 0 0; font-weight: 600; }

.drop:focus-within { border-color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

.queue li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.file-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-state { margin-top: 4px; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.file-state.done { color: var(--good); }
.file-state.failed { color: var(--bad); }

progress {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 6px;
  accent-color: var(--accent);
}

.note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
