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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6fa;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h2 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row input {
  flex: 1;
  min-width: 120px;
}

input[type="text"] {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: #4a7fcb;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

#addBtn {
  background: #4a7fcb;
  color: #fff;
}

#addBtn:hover {
  background: #3a6db5;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  flex: 1;
}

#clearSearchBtn {
  background: #eee;
  color: #555;
}

#clearSearchBtn:hover {
  background: #ddd;
}

.list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.count-label {
  font-size: 0.8rem;
  color: #999;
}

ul {
  list-style: none;
}

li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-place {
  font-size: 0.85rem;
  color: #777;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-place::before {
  content: "📍 ";
}

.delete-btn {
  background: none;
  color: #bbb;
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.delete-btn:hover {
  background: #fee;
  color: #e74c3c;
}

.empty-msg {
  color: #bbb;
  text-align: center;
  padding: 16px 0;
  font-size: 0.9rem;
}

.highlight {
  background: #fff3cd;
  border-radius: 3px;
}

@media (max-width: 480px) {
  .form-row input {
    min-width: 100%;
  }
  .form-row {
    flex-direction: column;
  }
  .form-row button {
    width: 100%;
  }
}
