* {
  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 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

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

.badge {
  background: #e74c3c;
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 26px;
  text-align: center;
}

.badge.hidden {
  display: none;
}

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

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

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

.form-group input:focus {
  border-color: #e74c3c;
}

#addBtn {
  width: 100%;
  padding: 12px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#addBtn:hover {
  background: #c0392b;
}

/* フィルターボタン */
.filter-section {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  flex: 1;
  padding: 8px;
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}

.filter-btn.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

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

.item-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid #e74c3c;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: opacity 0.2s;
}

.item-card.done {
  border-left-color: #95a5a6;
  opacity: 0.6;
}

.item-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #27ae60;
}

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

.item-name {
  font-size: 1rem;
  font-weight: bold;
  color: #2c3e50;
  word-break: break-word;
}

.item-card.done .item-name {
  text-decoration: line-through;
  color: #999;
}

.item-meta {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
  word-break: break-word;
}

.item-time {
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 4px;
}

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

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

/* 空メッセージ */
.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 20px;
  display: none;
}

.empty-msg.show {
  display: block;
}

/* レスポンシブ */
@media (max-width: 375px) {
  .container {
    padding: 12px;
  }

  header h1 {
    font-size: 1.3rem;
  }
}
