body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
}

.shell {
  padding: 2rem 0 3rem;
}

.hero {
  padding: 0 0 0.75rem;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1rem;
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: 1.5rem;
  color: #111;
}

.input-panel {
  margin-bottom: 1.5rem;
}

.input-row {
  display: flex;
  gap: 0.5rem;
}

.input-row input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-family: inherit;
  outline: none;
}

.input-row input:focus {
  border-color: #888;
}

.input-row button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
}

.input-row button:hover {
  background: #333;
}

.input-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.list-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.summary {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

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

li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

li:last-child {
  border-bottom: none;
}

li label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  cursor: pointer;
}

.toggle {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  border: 1px solid #888;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle.checked {
  background: #111;
  border-color: #111;
}

.toggle.checked::after {
  content: "";
  width: 1rem;
  height: 1rem;
  display: block;
  background:
    linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%)
      0.2rem 0.45rem / 0.35rem 0.2rem no-repeat,
    linear-gradient(
        -45deg,
        transparent 45%,
        #fff 45%,
        #fff 55%,
        transparent 55%
      )
      0.42rem 0.28rem / 0.5rem 0.2rem no-repeat;
}

.title {
  font-size: 0.9rem;
}

li.completed .title {
  text-decoration: line-through;
  color: #999;
}

.delete {
  background: none;
  border: 1px solid transparent;
  color: #c44;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-family: inherit;
  border-radius: 3px;
  opacity: 0;
}

li:hover .delete {
  opacity: 1;
}

.delete:hover {
  background: #fef0f0;
  border-color: #e8c0c0;
}

.status {
  color: #888;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.88rem;
}

.error {
  color: #b91c1c;
  padding: 0.5rem 0.7rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.count {
  color: #888;
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
