* {
  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;
}

header {
  text-align: center;
  padding: 24px 0 16px;
}

header h1 {
  font-size: 1.6rem;
  color: #2c3e50;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card.highlight {
  border-left: 4px solid #4a90d9;
}

/* フォーム */
.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-row input {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus {
  border-color: #4a90d9;
}

.form-row button {
  padding: 10px 18px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.form-row button:hover {
  background: #357abd;
}

/* バッジ */
.badge {
  background: #4a90d9;
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* メンバーリスト */
.member-list {
  list-style: none;
}

.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #f8f9fa;
  font-size: 0.95rem;
}

.member-list li.active-member {
  background: #ebf3ff;
  border: 1px solid #b3d1f7;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-name {
  font-weight: 600;
  color: #2c3e50;
}

.member-role {
  font-size: 0.85rem;
  color: #888;
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 10px;
}

.delete-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 1;
}

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

/* 現在の当番 */
.current-turn {
  text-align: center;
  padding: 20px;
  margin-bottom: 16px;
}

.current-turn .turn-name {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
  display: block;
}

.current-turn .turn-role {
  font-size: 1rem;
  color: #4a90d9;
  margin-top: 6px;
  display: block;
}

.current-turn .turn-date {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 4px;
  display: block;
}

.no-data {
  color: #aaa;
  font-size: 0.9rem;
}

.btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-primary {
  padding: 12px 28px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #357abd;
}

.btn-secondary {
  padding: 12px 20px;
  background: #fff;
  color: #888;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #f0f0f0;
}

.btn-link {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 6px;
  text-decoration: underline;
}

.btn-link:hover {
  color: #e74c3c;
}

/* 履歴リスト */
.history-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #555;
}

.history-list li:nth-child(odd) {
  background: #f8f9fa;
}

.history-num {
  font-size: 0.75rem;
  color: #aaa;
  min-width: 24px;
  text-align: right;
}

.history-name {
  font-weight: 600;
  color: #2c3e50;
}

.history-role {
  font-size: 0.82rem;
  color: #888;
}

.history-date {
  margin-left: auto;
  font-size: 0.78rem;
  color: #bbb;
  white-space: nowrap;
}

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

@media (max-width: 400px) {
  .btn-row {
    flex-direction: column;
  }
  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
