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

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

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1565c0;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2196f3;
}

h2 {
  font-size: 1rem;
  color: #444;
  margin-bottom: 12px;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}

.form-group input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2196f3;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1565c0;
}

/* 一覧 */
.list-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.list-header {
  margin-bottom: 12px;
}

.list-header h2 {
  margin-bottom: 8px;
}

#count {
  color: #2196f3;
  font-weight: 700;
}

#searchInput {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

#searchInput:focus {
  outline: none;
  border-color: #2196f3;
}

/* 名刺カード */
.card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  position: relative;
  background: #fafafa;
}

.card-company {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 2px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a237e;
  margin-bottom: 4px;
}

.card-phone {
  font-size: 0.9rem;
  color: #2196f3;
}

.card-phone a {
  color: #2196f3;
  text-decoration: none;
}

.card-phone a:hover {
  text-decoration: underline;
}

.card-memo {
  font-size: 0.82rem;
  color: #777;
  margin-top: 4px;
}

.btn-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid #e57373;
  color: #e57373;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-delete:hover {
  background: #e57373;
  color: #fff;
}

.empty {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 30px 0;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.25rem;
  }
}
