:root {
  --tg-theme-bg-color: #f8f9fa;
  --tg-theme-text-color: #111;
  --tg-theme-hint-color: #666;
  --accent: #34c759; /* green like in Hermes chat */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: var(--tg-theme-bg-color);
  color: var(--tg-theme-text-color);
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

header {
  margin-bottom: 16px;
  padding: 0 4px;
}

h1 {
  margin: 0 0 4px 0;
  font-size: 22px;
  font-weight: 600;
}

#subtitle {
  font-size: 13px;
  color: var(--tg-theme-hint-color);
}

.section {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.section-header {
  background: #f0f1f3;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 15px;
  color: #222;
  border-bottom: 1px solid #e5e7eb;
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f1f3;
  cursor: pointer;
  transition: background 0.1s;
}

.task:last-child {
  border-bottom: none;
}

.task:hover {
  background: #fafafa;
}

.task input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.task span {
  font-size: 15px;
  line-height: 1.3;
  flex: 1;
}

.task.done span {
  text-decoration: line-through;
  color: #888;
}

.actions {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

button {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  border: none;
  background: #007aff;
  color: white;
  cursor: pointer;
}

button.secondary {
  background: #f2f2f7;
  color: #111;
}

footer {
  font-size: 12px;
  color: var(--tg-theme-hint-color);
  text-align: center;
  margin-top: 20px;
  padding: 0 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #888;
}

.error {
  background: #fee;
  color: #c00;
  padding: 12px;
  border-radius: 10px;
  margin: 10px 0;
}
