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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Meiryo', sans-serif;
  background: #f0f4f8;
  color: #2d3748;
  min-height: 100vh;
}

header {
  background: #3b82f6;
  color: #fff;
  padding: 20px 16px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.total-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.total-progress span {
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 90px;
}

.progress-bar {
  flex: 1;
  background: rgba(255,255,255,0.3);
  border-radius: 99px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

.reset-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.reset-btn:hover {
  background: rgba(255,255,255,0.35);
}

main {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  cursor: pointer;
  user-select: none;
}

.category-icon {
  font-size: 1.3rem;
}

.category-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
}

.category-badge {
  background: #e2e8f0;
  color: #4a5568;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.category-badge.done {
  background: #c6f6d5;
  color: #276749;
}

.category-progress-bar {
  height: 4px;
  background: #e2e8f0;
  margin: 0 16px 10px;
  border-radius: 99px;
  overflow: hidden;
}

.category-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

.category-items {
  padding: 0 16px 14px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f7fafc;
  cursor: pointer;
}

.check-item:last-child {
  border-bottom: none;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}

.check-item label {
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  flex: 1;
}

.check-item.checked label {
  color: #a0aec0;
  text-decoration: line-through;
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.1rem;
  }
  main {
    padding: 12px;
    gap: 12px;
  }
  .check-item label {
    font-size: 0.88rem;
  }
}
