:root {
  --ink: #181a1b;
  --bg: #f7f6f2;
  --accent: #2f6f4e;
  --accent-soft: #e7f0ea;
  --line: #dedbd3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: -apple-system, Segoe UI, Inter, sans-serif;
  color: var(--ink);
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 26px;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 4px 0 20px;
  color: #6b6f68;
  font-size: 0.9rem;
}

#task-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

#task-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}

#task-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
}

button:hover {
  background: #000;
}

.progress {
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

#task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.task-item.completed span {
  text-decoration: line-through;
  color: #9a9d97;
}

.task-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.task-item span {
  flex: 1;
  font-size: 0.95rem;
  word-break: break-word;
}

.delete-btn {
  background: none;
  color: #b34747;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.delete-btn:hover {
  background: #fbeaea;
}

.empty-state {
  text-align: center;
  color: #9a9d97;
  font-size: 0.88rem;
  padding: 16px 0;
}
