* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 20px 0 10px 0;
  color: #666;
}

button {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
}

button:active {
  opacity: 0.7;
}

.share-btn {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
}

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

.add-form input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.add-form input#itemQuantity {
  flex: 0 0 100px;
}

.status {
  padding: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
  border: 1px solid;
}

.status.show {
  display: block;
}

.status.success {
  background: #efe;
  border-color: #0a0;
}

.status.error {
  background: #fee;
  border-color: #a00;
}

.list-section {
  margin-bottom: 20px;
}

.item-list {
  list-style: none;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

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

.item-content {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.item-name {
  font-size: 16px;
}

.item-quantity {
  font-size: 14px;
  color: #666;
}

.delete-btn {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  padding: 4px 8px;
  font-size: 12px;
}

.checked-list .item-name {
  text-decoration: line-through;
  color: #999;
}

.checked-list .item-quantity {
  text-decoration: line-through;
  color: #999;
}

.item-list:empty::after {
  content: '—';
  display: block;
  padding: 8px 0;
  color: #ccc;
}

@media (max-width: 500px) {
  .add-form {
    flex-wrap: wrap;
  }
  
  .add-form input#itemQuantity {
    flex: 0 0 calc(40% - 4px);
  }
  
  .add-form button {
    flex: 1;
  }
}
