* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, #ead8b8, transparent 30%),
    linear-gradient(135deg, #f7f0df, #efe1c2);
  color: #3a2418;
}

.app {
  padding: 32px;
}

header {
  background: rgba(112, 45, 32, 0.94);
  color: #f8edd4;
  padding: 28px 32px;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 16px 40px rgba(73, 32, 19, 0.22);
}

header h1 {
  font-size: 30px;
  letter-spacing: 4px;
}

header p {
  margin-top: 8px;
  color: #e8d5ae;
}

button {
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  background: #c89b3c;
  color: #fff8e6;
  cursor: pointer;
  font-size: 15px;
}

button:hover {
  opacity: 0.9;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.stat {
  background: rgba(255, 251, 239, 0.86);
  border: 1px solid #dcc18a;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(95, 55, 23, 0.12);
}

.stat span {
  color: #7b6042;
}

.stat strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.todo strong { color: #9a4a31; }
.doing strong { color: #b98222; }
.done strong { color: #3f7d4c; }

.priority-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.priority-stats div {
  background: #fff8e6;
  border: 1px solid #d8b66a;
  padding: 12px 22px;
  border-radius: 999px;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.column {
  min-height: 520px;
  background: rgba(255, 250, 235, 0.8);
  border: 1px solid #d8b66a;
  border-radius: 24px;
  padding: 20px;
}

.column h2 {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #b86b3c;
  letter-spacing: 3px;
}

.task-card {
  background: #fffdf3;
  border-left: 6px solid #9a4a31;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px rgba(88, 47, 19, 0.12);
}

.task-card h3 {
  margin-bottom: 8px;
}

.task-meta {
  font-size: 14px;
  color: #7b6042;
  margin-bottom: 12px;
}

.priority {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  color: white;
  margin-right: 8px;
}

.P0 { background: #9f1d1d; }
.P1 { background: #c75b2c; }
.P2 { background: #b98222; }
.P3 { background: #5e8c61; }

.task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-actions button {
  padding: 7px 12px;
  font-size: 13px;
  background: #7b3f2a;
}

.task-actions .delete {
  background: #8b1e1e;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38, 20, 12, 0.5);
}

.dialog {
  width: 380px;
  background: #fff8e6;
  border-radius: 24px;
  padding: 28px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dialog h2 {
  margin-bottom: 18px;
}

.dialog input,
.dialog select {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #c9a85d;
  border-radius: 12px;
  background: #fffdf3;
}

.actions {
  display: flex;
  gap: 12px;
}

.ghost {
  background: #8a7a5c;
}

@media (max-width: 900px) {
  .stats,
  .board {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}