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

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

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

h1 {
  font-size: 1.4rem;
  text-align: center;
  padding: 16px 0 12px;
  color: #2d7dd2;
}

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

/* タブ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #ddd;
  color: #555;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.tab.active {
  background: #2d7dd2;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* フォーム */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
}

input[type="text"]:focus {
  outline: none;
  border-color: #2d7dd2;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

#btn-add {
  background: #2d7dd2;
  color: #fff;
}

#btn-add:hover {
  background: #2268b3;
}

/* カウント表示 */
.count-bar,
.status-bar {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #e8f1fb;
  border-radius: 8px;
}

.status-bar span {
  font-weight: bold;
  color: #2d7dd2;
}

/* 検索 */
.search-bar {
  margin-bottom: 10px;
}

/* リスト */
ul {
  list-style: none;
}

.participant-item,
.checkin-item {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.participant-item .name,
.checkin-item .name {
  font-size: 1rem;
  font-weight: bold;
}

.participant-item .note,
.checkin-item .note {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}

.participant-item .info,
.checkin-item .info {
  flex: 1;
}

.participant-item .btn-delete {
  background: #e74c3c;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-left: 10px;
}

.checkin-item .btn-checkin {
  background: #27ae60;
  color: #fff;
  padding: 8px 14px;
  font-size: 0.9rem;
  border-radius: 6px;
  margin-left: 10px;
  white-space: nowrap;
}

.checkin-item.checked {
  background: #f0faf4;
  border-left: 4px solid #27ae60;
}

.checkin-item.checked .btn-checkin {
  background: #bbb;
}

.checkin-item .time-label {
  font-size: 0.78rem;
  color: #27ae60;
  margin-top: 2px;
}

.checkin-item.checked .name {
  text-decoration: line-through;
  color: #aaa;
}

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

@media (min-width: 500px) {
  .form-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .form-group input {
    flex: 1;
    min-width: 0;
  }

  #btn-add {
    width: auto;
  }
}
