:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #4b5563;
  --border: #e5e7eb;
  --subtle: #f8f9fa;
  --danger: #dc2626;
  --radius: 8px;
  --font: Inter, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 320px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

header {
  padding: 16px 16px 8px;
}

h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.card {
  margin: 0 16px 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--subtle);
}

.card.row {
  display: flex;
  align-items: center;
}

.actions {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}

button.primary {
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: var(--text);
  color: #fff;
}

button.secondary {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

button.small {
  margin-top: 8px;
  width: auto;
}

button.link {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
}

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

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dropzone {
  cursor: pointer;
  border-style: dashed;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragover {
  border-color: var(--text);
  background: #fff;
}

.dropzone.busy {
  cursor: wait;
  opacity: 0.85;
}

.drop-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.drop-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

#recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

#recent-list li {
  margin-bottom: 6px;
}

#recent-list a {
  font-size: 12px;
  color: var(--text);
}

.message {
  margin: 0 16px 12px;
  font-size: 12px;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.hidden {
  display: none;
}

footer {
  padding: 8px 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a {
  font-size: 12px;
  color: var(--muted);
}

#connection-label {
  margin: 0;
  font-size: 13px;
}
