/* Board & columns — paper rails on the desk. */

.board {
  display: flex;
  align-items: flex-start;
  gap: var(--s5);
  padding: var(--s5);
  flex: 1;
  overflow-x: auto;
  min-height: 0;
}

.column {
  width: 300px;
  flex: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 118px);
  box-shadow: var(--shadow-card);
}

@media (max-width: 680px) {
  .column {
    width: 272px;
  }
}

.column.drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
}

.column-header {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s3) var(--s3) var(--s2) var(--s4);
  cursor: grab;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-panel) var(--r-panel) 0 0;
  background: var(--surface-sunk);
  touch-action: none;
}
.column-header:active {
  cursor: grabbing;
}

.column.dragging > .column-header {
  opacity: 0.5;
}

.column-grip {
  color: var(--faint);
  flex: none;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  user-select: none;
}

.column-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
}
.column-title:focus-visible {
  border-color: var(--accent);
}
.column-title:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.column-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  flex: none;
}

.column-menu-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  flex: none;
}
.column-menu-btn:hover {
  background: var(--surface);
  color: var(--ink);
}

.column-body {
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
}

.column-body.drop-hover {
  background: var(--accent-soft);
}

.column-add {
  margin: 0 var(--s3) var(--s3);
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  border-radius: var(--r-card);
  padding: var(--s2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease),
    background var(--dur-s) var(--ease);
}
.column-add:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Column dropdown menu */
.col-menu {
  position: absolute;
  z-index: var(--z-overlay);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
  padding: var(--s1);
  min-width: 150px;
  display: flex;
  flex-direction: column;
}
.col-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--r-card);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.col-menu button:hover {
  background: var(--surface-sunk);
}
.col-menu button.danger {
  color: var(--shock);
}
.col-menu button.danger:hover {
  background: var(--shock-soft);
}
.col-menu button:disabled {
  color: var(--faint);
  cursor: default;
  background: transparent;
}

/* Reorder hint slot shown while dragging a column */

/* While dragging a column over another, mark the insertion side with an accent
   bar (rendered by the neighbouring column itself — no DOM node to insert). */
.column {
  position: relative;
}

.column.insert-before::before,
.column.insert-after::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 3px;
  background: var(--accent);
  z-index: var(--z-card-drag);
  pointer-events: none;
}

.column.insert-before::before {
  left: -7px;
}

.column.insert-after::after {
  right: -7px;
}

/* Done column: a faint header wash so completion reads at a glance */
.column.is-done-col > .column-header {
  background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface-sunk));
}

/* ---------- Empty states ---------- */

.column-empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  color: var(--faint);
  font-size: 13px;
  text-align: center;
  padding: var(--s5) var(--s3);
  font-family: var(--font-mono);
}

.empty-board {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s4);
  padding: var(--s6);
}

/* Poster + marginalia archetype */
.empty-poster {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
  color: var(--ink);
}

.empty-margin {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.empty-margin p {
  margin: 0;
}
