:root {
  --bg: #f6f5f3;
  --panel: #ffffff;
  --accent: #7a8f7a;
  --border: #7a8f7a;
  --text: #2b2b2b;
  --muted: #777;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.screen {
  display: none;
  padding: 2rem;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

h1 {
  margin-bottom: 1.5rem;
}

.names {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 600px;
}

.name-card {
  background: var(--panel);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}

.name-card:hover {
  background: #eef3ee;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.back {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* TODO ITEM */
.todo-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: 12px;
  padding: 1rem 0;
}

.todo-item input[type="checkbox"] {
  margin-top: 4px;
  align-self: flex-start;
}

.todo-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.todo-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.todo-text {
  font-size: 0.95rem;
}

.todo-author {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
  opacity: 0.6;
}

/* COMMENTS */
.comment-toggle {
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

.comments {
  display: none;
  margin-top: 0.5rem;
}

.comments.open {
  display: block;
}

.comment {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* INPUTS */
input {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
}

button {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
}
