:root {
  --bg: #f6f7fb;
  --card-bg: #ffffff;
  --text: #222533;
  --muted: #6f7587;
  --line: #d8dcef;
  --accent: #4f6dff;
  --placeholder: #c9d3ff;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  padding: 1.25rem 1rem 0.75rem;
}

header h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

header p {
  color: var(--muted);
  margin: 0.4rem 0 0;
}

main {
  padding: 0.75rem 1rem 1.5rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.column {
  background: #edf0ff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem;
  min-height: 340px;
}

.column-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 260px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.78rem;
  box-shadow: 0 2px 6px rgb(20 31 60 / 8%);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

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

.card.dragging {
  opacity: 0.35;
}

.drag-preview {
  position: fixed;
  z-index: 1000;
  width: min(280px, calc(100vw - 1.5rem));
  pointer-events: none;
  margin: 0;
  box-shadow: 0 12px 30px rgb(19 34 83 / 22%);
  transform: translate(-50%, -50%) scale(1.02);
  border: 1px solid var(--accent);
  cursor: grabbing;
}

.placeholder {
  border: 2px dashed var(--placeholder);
  border-radius: 10px;
  background: rgb(79 109 255 / 12%);
}

.column.drop-target {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgb(79 109 255 / 30%);
}

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

  .column {
    min-height: unset;
  }

  .card-list {
    min-height: 90px;
  }
}
