:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1c2330;
  --text-muted: #6b7484;
  --accent: #2f6f5e;
  --accent-hover: #275c4e;
  --danger: #b23b3b;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(28, 35, 48, 0.06), 0 4px 16px rgba(28, 35, 48, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.app {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.app__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.app__title {
  font-size: 1.4rem;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.01em;
}

.app__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.composer {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.composer__input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
}

.composer__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.composer__button {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.composer__button:hover {
  background: var(--accent-hover);
}

.composer__button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.todo-item__label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.todo-item__toggle {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.todo-item__text {
  font-size: 0.95rem;
  word-break: break-word;
}

.todo-item.is-done .todo-item__text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-item__delete {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.todo-item__delete:hover {
  background: rgba(178, 59, 59, 0.08);
}

.todo-item__delete:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 1px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 16px 0;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
