:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #d8dce6;
  --text: #202536;
  --muted: #697184;
  --accent: #1f5eff;
  --warn: #fff5d6;
  --header-height: 114px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

header {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

h1 {
  font-size: 18px;
  margin: 0 0 4px;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}

#syncStatus {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

select, button {
  border: 1px solid var(--border);
  background: white;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  max-width: 220px;
}

button {
  cursor: pointer;
  font-weight: 700;
}

#notice {
  display: none;
  margin: 10px 16px 0;
  padding: 10px 12px;
  background: var(--warn);
  border: 1px solid #f1d98a;
  border-radius: 12px;
  color: #6b5300;
  font-size: 13px;
}

#board {
  display: flex;
  gap: 14px;
  overflow: auto;
  padding: 16px;
  height: calc(100vh - 64px);
  align-items: flex-start;
  scroll-behavior: auto;
}

#notice:not(:empty) + #board {
  height: calc(100vh - 116px);
}

.column {
  flex: 0 0 320px;
  background: #eef1f7;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  height: calc(100vh - 100px);
  min-height: calc(100vh - 100px);
  overflow-y: auto;
}

#notice:not(:empty) + #board .column {
  height: calc(100vh - 152px);
  min-height: calc(100vh - 152px);
}

.column.drag-over {
  outline: 3px solid rgba(31,94,255,.22);
}

.column-header {
  position: sticky;
  top: -10px;
  z-index: 3;
  background: #eef1f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -10px -10px 10px;
  padding: 14px 10px 10px;
  border-bottom: 1px solid rgba(216,220,230,.6);
  border-radius: 16px 16px 0 0;
}

.column-title {
  font-weight: 800;
  font-size: 18px;
}

.count {
  background: white;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  cursor: pointer;
}

.card:hover {
  border-color: var(--accent);
}

.card.dragging {
  opacity: .55;
}

.card-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
}

.card-snippet {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 10px;
  white-space: pre-line;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  background: #f2f4f8;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
}

.unread {
  background: #ffe6e6;
  border-color: #ffb7b7;
  color: #9d1b1b;
  font-weight: 800;
}

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #202536;
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  display: none;
  max-width: 360px;
  font-size: 13px;
  z-index: 20;
}
