:root {
  --bg: #f6f5f2;
  --card: #fff;
  --text: #222;
  --muted: #777;
  --accent: #c2410c;
  --border: #ddd;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  margin: 0;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.heading h1 {
  flex: 1;
  min-width: 0;
}

.heading .actions {
  margin: 0;
  margin-left: auto;
}

.hint {
  color: var(--muted);
}

.button,
.create-form input[type=submit] {
  font: inherit;
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.error {
  color: #b91c1c;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 600px;
}

.create-form input[type=text],
.create-form input:not([type]),
.create-form textarea {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.create-form input[type=submit] {
  align-self: flex-start;
}

.board {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 640px) {
  .board {
    grid-template-columns: 1fr;
  }
}

.set,
.pool {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  min-height: 4rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
}

.set {
  counter-reset: set;
}

.item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: grab;
  user-select: none;
}

.set .item::before {
  counter-increment: set;
  content: counter(set) ".";
  color: var(--muted);
  min-width: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.pool .item {
  color: var(--muted);
  cursor: pointer;
}

.pool .item:hover {
  border-color: var(--accent);
  color: var(--text);
}

.item .name {
  flex: 1;
}

.remove {
  border: 0;
  background: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.25rem;
}

.remove:hover {
  color: #b91c1c;
}

.sortable-ghost {
  opacity: 0.4;
}
