:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 40px rgb(17 24 39 / 10%);
}

h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.muted {
  color: #6b7280;
  margin: 0 0 18px;
}

.form,
.add-row {
  display: grid;
  gap: 12px;
}

.add-row {
  grid-template-columns: 1fr auto;
  margin: 20px 0;
}

input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #111827;
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: #111827;
  color: white;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

button.small {
  padding: 10px 12px;
  font-size: 14px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
}

.item input[type="checkbox"] {
  width: 24px;
  height: 24px;
}

.item-title {
  font-size: 17px;
  word-break: break-word;
}

.item-title.checked {
  color: #9ca3af;
  text-decoration: line-through;
}

.delete-button {
  background: #fee2e2;
  color: #991b1b;
  padding: 9px 11px;
}

.message {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 720px;
  margin: 0 auto;
  background: #111827;
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: center;
}

.center {
  text-align: center;
}

.hidden {
  display: none;
}

@media (max-width: 520px) {
  .app {
    padding: 12px;
  }

  .card {
    padding: 18px;
    border-radius: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .add-row {
    grid-template-columns: 1fr;
  }
}

.danger-button {
  background: #dc2626;
}

.danger-button:hover {
  background: #b91c1c;
}
